\hypertarget{g__bde__crypt_8c}{}\doxysection{geom/bde/g\+\_\+bde\+\_\+crypt.c File Reference}
\label{g__bde__crypt_8c}\index{geom/bde/g\_bde\_crypt.c@{geom/bde/g\_bde\_crypt.c}}
{\ttfamily \#include $<$sys/param.\+h$>$}\newline
{\ttfamily \#include $<$sys/bio.\+h$>$}\newline
{\ttfamily \#include $<$sys/lock.\+h$>$}\newline
{\ttfamily \#include $<$sys/mutex.\+h$>$}\newline
{\ttfamily \#include $<$sys/queue.\+h$>$}\newline
{\ttfamily \#include $<$sys/malloc.\+h$>$}\newline
{\ttfamily \#include $<$sys/libkern.\+h$>$}\newline
{\ttfamily \#include $<$sys/endian.\+h$>$}\newline
{\ttfamily \#include $<$sys/md5.\+h$>$}\newline
{\ttfamily \#include $<$crypto/rijndael/rijndael-\/api-\/fst.\+h$>$}\newline
{\ttfamily \#include $<$crypto/sha2/sha512.\+h$>$}\newline
{\ttfamily \#include $<$geom/geom.\+h$>$}\newline
{\ttfamily \#include $<$geom/bde/g\+\_\+bde.\+h$>$}\newline
Include dependency graph for g\+\_\+bde\+\_\+crypt.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{d4/d14/g__bde__crypt_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static void \mbox{\hyperlink{g__bde__crypt_8c_a7a31fdc0198933c4dd749ea4731f039a}{g\+\_\+bde\+\_\+kkey}} (struct \mbox{\hyperlink{structg__bde__softc}{g\+\_\+bde\+\_\+softc}} $\ast$sc, key\+Instance $\ast$ki, int dir, off\+\_\+t sector)
\item 
void \mbox{\hyperlink{g__bde__crypt_8c_a0e360ba2bc6c7e1f8cd28e1766276311}{g\+\_\+bde\+\_\+crypt\+\_\+read}} (struct \mbox{\hyperlink{structg__bde__work}{g\+\_\+bde\+\_\+work}} $\ast$wp)
\item 
void \mbox{\hyperlink{g__bde__crypt_8c_a3704204fda32232892e3c0f046c04e8c}{g\+\_\+bde\+\_\+crypt\+\_\+write}} (struct \mbox{\hyperlink{structg__bde__work}{g\+\_\+bde\+\_\+work}} $\ast$wp)
\item 
void \mbox{\hyperlink{g__bde__crypt_8c_aa424947a388f787015d468937a543765}{g\+\_\+bde\+\_\+crypt\+\_\+delete}} (struct \mbox{\hyperlink{structg__bde__work}{g\+\_\+bde\+\_\+work}} $\ast$wp)
\item 
uint64\+\_\+t \mbox{\hyperlink{g__bde__crypt_8c_a70b43defa589bce1b2aa95103c5f50ab}{g\+\_\+bde\+\_\+max\+\_\+sector}} (struct \mbox{\hyperlink{structg__bde__key}{g\+\_\+bde\+\_\+key}} $\ast$kp)
\item 
void \mbox{\hyperlink{g__bde__crypt_8c_ac2890ae097fa50be721493bdd8d5b3d7}{g\+\_\+bde\+\_\+map\+\_\+sector}} (struct \mbox{\hyperlink{structg__bde__work}{g\+\_\+bde\+\_\+work}} $\ast$wp)
\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{g__bde__crypt_8c_aa424947a388f787015d468937a543765}\label{g__bde__crypt_8c_aa424947a388f787015d468937a543765}} 
\index{g\_bde\_crypt.c@{g\_bde\_crypt.c}!g\_bde\_crypt\_delete@{g\_bde\_crypt\_delete}}
\index{g\_bde\_crypt\_delete@{g\_bde\_crypt\_delete}!g\_bde\_crypt.c@{g\_bde\_crypt.c}}
\doxysubsubsection{\texorpdfstring{g\_bde\_crypt\_delete()}{g\_bde\_crypt\_delete()}}
{\footnotesize\ttfamily void g\+\_\+bde\+\_\+crypt\+\_\+delete (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structg__bde__work}{g\+\_\+bde\+\_\+work}} $\ast$}]{wp }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{g__bde__crypt_8c_source_l00193}{193}} of file \mbox{\hyperlink{g__bde__crypt_8c_source}{g\+\_\+bde\+\_\+crypt.\+c}}.



References \mbox{\hyperlink{g__bde_8h_source_l00200}{AES\+\_\+encrypt()}}, \mbox{\hyperlink{g__bde_8h_source_l00182}{AES\+\_\+init()}}, \mbox{\hyperlink{g__bde_8h_source_l00191}{AES\+\_\+makekey()}}, \mbox{\hyperlink{g__bde_8h_source_l00074}{g\+\_\+bde\+\_\+sector\+::data}}, \mbox{\hyperlink{g__bde_8h_source_l00049}{G\+\_\+\+BDE\+\_\+\+SKEYBITS}}, \mbox{\hyperlink{g__bde_8h_source_l00050}{G\+\_\+\+BDE\+\_\+\+SKEYLEN}}, \mbox{\hyperlink{g__bde_8h_source_l00086}{g\+\_\+bde\+\_\+work\+::length}}, \mbox{\hyperlink{g__bde_8h_source_l00134}{g\+\_\+bde\+\_\+softc\+::sectorsize}}, \mbox{\hyperlink{g__bde_8h_source_l00089}{g\+\_\+bde\+\_\+work\+::softc}}, and \mbox{\hyperlink{g__bde_8h_source_l00093}{g\+\_\+bde\+\_\+work\+::sp}}.



Referenced by \mbox{\hyperlink{g__bde__work_8c_source_l00564}{g\+\_\+bde\+\_\+worker()}}.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=313pt]{de/de8/g__bde__crypt_8c_aa424947a388f787015d468937a543765_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/de8/g__bde__crypt_8c_aa424947a388f787015d468937a543765_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{g__bde__crypt_8c_a0e360ba2bc6c7e1f8cd28e1766276311}\label{g__bde__crypt_8c_a0e360ba2bc6c7e1f8cd28e1766276311}} 
\index{g\_bde\_crypt.c@{g\_bde\_crypt.c}!g\_bde\_crypt\_read@{g\_bde\_crypt\_read}}
\index{g\_bde\_crypt\_read@{g\_bde\_crypt\_read}!g\_bde\_crypt.c@{g\_bde\_crypt.c}}
\doxysubsubsection{\texorpdfstring{g\_bde\_crypt\_read()}{g\_bde\_crypt\_read()}}
{\footnotesize\ttfamily void g\+\_\+bde\+\_\+crypt\+\_\+read (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structg__bde__work}{g\+\_\+bde\+\_\+work}} $\ast$}]{wp }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{g__bde__crypt_8c_source_l00118}{118}} of file \mbox{\hyperlink{g__bde__crypt_8c_source}{g\+\_\+bde\+\_\+crypt.\+c}}.



References \mbox{\hyperlink{g__bde_8h_source_l00209}{AES\+\_\+decrypt()}}, \mbox{\hyperlink{g__bde_8h_source_l00182}{AES\+\_\+init()}}, \mbox{\hyperlink{g__bde_8h_source_l00191}{AES\+\_\+makekey()}}, \mbox{\hyperlink{g__bde_8h_source_l00074}{g\+\_\+bde\+\_\+sector\+::data}}, \mbox{\hyperlink{g__bde_8h_source_l00087}{g\+\_\+bde\+\_\+work\+::data}}, \mbox{\hyperlink{g__bde__crypt_8c_source_l00082}{g\+\_\+bde\+\_\+kkey()}}, \mbox{\hyperlink{g__bde_8h_source_l00049}{G\+\_\+\+BDE\+\_\+\+SKEYBITS}}, \mbox{\hyperlink{g__bde_8h_source_l00050}{G\+\_\+\+BDE\+\_\+\+SKEYLEN}}, \mbox{\hyperlink{g__bde_8h_source_l00092}{g\+\_\+bde\+\_\+work\+::ko}}, \mbox{\hyperlink{g__bde_8h_source_l00094}{g\+\_\+bde\+\_\+work\+::ksp}}, \mbox{\hyperlink{g__bde_8h_source_l00086}{g\+\_\+bde\+\_\+work\+::length}}, \mbox{\hyperlink{g__bde_8h_source_l00085}{g\+\_\+bde\+\_\+work\+::offset}}, \mbox{\hyperlink{g__bde_8h_source_l00134}{g\+\_\+bde\+\_\+softc\+::sectorsize}}, and \mbox{\hyperlink{g__bde_8h_source_l00089}{g\+\_\+bde\+\_\+work\+::softc}}.



Referenced by \mbox{\hyperlink{g__bde__work_8c_source_l00564}{g\+\_\+bde\+\_\+worker()}}.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/de8/g__bde__crypt_8c_a0e360ba2bc6c7e1f8cd28e1766276311_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/de8/g__bde__crypt_8c_a0e360ba2bc6c7e1f8cd28e1766276311_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{g__bde__crypt_8c_a3704204fda32232892e3c0f046c04e8c}\label{g__bde__crypt_8c_a3704204fda32232892e3c0f046c04e8c}} 
\index{g\_bde\_crypt.c@{g\_bde\_crypt.c}!g\_bde\_crypt\_write@{g\_bde\_crypt\_write}}
\index{g\_bde\_crypt\_write@{g\_bde\_crypt\_write}!g\_bde\_crypt.c@{g\_bde\_crypt.c}}
\doxysubsubsection{\texorpdfstring{g\_bde\_crypt\_write()}{g\_bde\_crypt\_write()}}
{\footnotesize\ttfamily void g\+\_\+bde\+\_\+crypt\+\_\+write (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structg__bde__work}{g\+\_\+bde\+\_\+work}} $\ast$}]{wp }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{g__bde__crypt_8c_source_l00152}{152}} of file \mbox{\hyperlink{g__bde__crypt_8c_source}{g\+\_\+bde\+\_\+crypt.\+c}}.



References \mbox{\hyperlink{g__bde_8h_source_l00200}{AES\+\_\+encrypt()}}, \mbox{\hyperlink{g__bde_8h_source_l00182}{AES\+\_\+init()}}, \mbox{\hyperlink{g__bde_8h_source_l00191}{AES\+\_\+makekey()}}, \mbox{\hyperlink{g__bde_8h_source_l00074}{g\+\_\+bde\+\_\+sector\+::data}}, \mbox{\hyperlink{g__bde_8h_source_l00087}{g\+\_\+bde\+\_\+work\+::data}}, \mbox{\hyperlink{g__bde__crypt_8c_source_l00082}{g\+\_\+bde\+\_\+kkey()}}, \mbox{\hyperlink{g__bde_8h_source_l00049}{G\+\_\+\+BDE\+\_\+\+SKEYBITS}}, \mbox{\hyperlink{g__bde_8h_source_l00050}{G\+\_\+\+BDE\+\_\+\+SKEYLEN}}, \mbox{\hyperlink{g__bde_8h_source_l00092}{g\+\_\+bde\+\_\+work\+::ko}}, \mbox{\hyperlink{g__bde_8h_source_l00094}{g\+\_\+bde\+\_\+work\+::ksp}}, \mbox{\hyperlink{g__bde_8h_source_l00086}{g\+\_\+bde\+\_\+work\+::length}}, \mbox{\hyperlink{g__bde_8h_source_l00085}{g\+\_\+bde\+\_\+work\+::offset}}, \mbox{\hyperlink{g__bde_8h_source_l00134}{g\+\_\+bde\+\_\+softc\+::sectorsize}}, \mbox{\hyperlink{g__bde_8h_source_l00089}{g\+\_\+bde\+\_\+work\+::softc}}, and \mbox{\hyperlink{g__bde_8h_source_l00093}{g\+\_\+bde\+\_\+work\+::sp}}.



Referenced by \mbox{\hyperlink{g__bde__work_8c_source_l00564}{g\+\_\+bde\+\_\+worker()}}.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/de8/g__bde__crypt_8c_a3704204fda32232892e3c0f046c04e8c_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/de8/g__bde__crypt_8c_a3704204fda32232892e3c0f046c04e8c_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{g__bde__crypt_8c_a7a31fdc0198933c4dd749ea4731f039a}\label{g__bde__crypt_8c_a7a31fdc0198933c4dd749ea4731f039a}} 
\index{g\_bde\_crypt.c@{g\_bde\_crypt.c}!g\_bde\_kkey@{g\_bde\_kkey}}
\index{g\_bde\_kkey@{g\_bde\_kkey}!g\_bde\_crypt.c@{g\_bde\_crypt.c}}
\doxysubsubsection{\texorpdfstring{g\_bde\_kkey()}{g\_bde\_kkey()}}
{\footnotesize\ttfamily static void g\+\_\+bde\+\_\+kkey (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structg__bde__softc}{g\+\_\+bde\+\_\+softc}} $\ast$}]{sc,  }\item[{key\+Instance $\ast$}]{ki,  }\item[{int}]{dir,  }\item[{off\+\_\+t}]{sector }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Definition at line \mbox{\hyperlink{g__bde__crypt_8c_source_l00082}{82}} of file \mbox{\hyperlink{g__bde__crypt_8c_source}{g\+\_\+bde\+\_\+crypt.\+c}}.



References \mbox{\hyperlink{g__bde_8h_source_l00191}{AES\+\_\+makekey()}}, \mbox{\hyperlink{g__part__if_8m_source_l00212}{buf}}, \mbox{\hyperlink{g__bde_8h_source_l00051}{G\+\_\+\+BDE\+\_\+\+KKEYBITS}}, \mbox{\hyperlink{g__bde_8h_source_l00142}{g\+\_\+bde\+\_\+softc\+::key}}, \mbox{\hyperlink{g__bde_8h_source_l00122}{g\+\_\+bde\+\_\+key\+::mkey}}, and \mbox{\hyperlink{g__bde_8h_source_l00118}{g\+\_\+bde\+\_\+key\+::salt}}.



Referenced by \mbox{\hyperlink{g__bde__crypt_8c_source_l00118}{g\+\_\+bde\+\_\+crypt\+\_\+read()}}, and \mbox{\hyperlink{g__bde__crypt_8c_source_l00152}{g\+\_\+bde\+\_\+crypt\+\_\+write()}}.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=275pt]{de/de8/g__bde__crypt_8c_a7a31fdc0198933c4dd749ea4731f039a_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/de8/g__bde__crypt_8c_a7a31fdc0198933c4dd749ea4731f039a_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{g__bde__crypt_8c_ac2890ae097fa50be721493bdd8d5b3d7}\label{g__bde__crypt_8c_ac2890ae097fa50be721493bdd8d5b3d7}} 
\index{g\_bde\_crypt.c@{g\_bde\_crypt.c}!g\_bde\_map\_sector@{g\_bde\_map\_sector}}
\index{g\_bde\_map\_sector@{g\_bde\_map\_sector}!g\_bde\_crypt.c@{g\_bde\_crypt.c}}
\doxysubsubsection{\texorpdfstring{g\_bde\_map\_sector()}{g\_bde\_map\_sector()}}
{\footnotesize\ttfamily void g\+\_\+bde\+\_\+map\+\_\+sector (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structg__bde__work}{g\+\_\+bde\+\_\+work}} $\ast$}]{wp }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{g__bde__crypt_8c_source_l00269}{269}} of file \mbox{\hyperlink{g__bde__crypt_8c_source}{g\+\_\+bde\+\_\+crypt.\+c}}.



References \mbox{\hyperlink{g__bde_8h_source_l00053}{G\+\_\+\+BDE\+\_\+\+MAXKEYS}}, \mbox{\hyperlink{g__bde_8h_source_l00050}{G\+\_\+\+BDE\+\_\+\+SKEYLEN}}, \mbox{\hyperlink{g__bde_8h_source_l00142}{g\+\_\+bde\+\_\+softc\+::key}}, \mbox{\hyperlink{g__bde_8h_source_l00110}{g\+\_\+bde\+\_\+key\+::keyoffset}}, \mbox{\hyperlink{g__bde_8h_source_l00092}{g\+\_\+bde\+\_\+work\+::ko}}, \mbox{\hyperlink{g__bde_8h_source_l00091}{g\+\_\+bde\+\_\+work\+::kso}}, \mbox{\hyperlink{g__bde_8h_source_l00086}{g\+\_\+bde\+\_\+work\+::length}}, \mbox{\hyperlink{g__raid__tr__if_8m_source_l00100}{length}}, \mbox{\hyperlink{g__bde_8h_source_l00112}{g\+\_\+bde\+\_\+key\+::lsector}}, \mbox{\hyperlink{g__bde_8h_source_l00128}{g\+\_\+bde\+\_\+key\+::media\+\_\+width}}, \mbox{\hyperlink{g__bde_8h_source_l00085}{g\+\_\+bde\+\_\+work\+::offset}}, \mbox{\hyperlink{g__bde_8h_source_l00106}{g\+\_\+bde\+\_\+key\+::sector0}}, \mbox{\hyperlink{g__bde_8h_source_l00108}{g\+\_\+bde\+\_\+key\+::sectorN}}, \mbox{\hyperlink{g__bde_8h_source_l00114}{g\+\_\+bde\+\_\+key\+::sectorsize}}, \mbox{\hyperlink{g__bde_8h_source_l00090}{g\+\_\+bde\+\_\+work\+::so}}, \mbox{\hyperlink{g__bde_8h_source_l00089}{g\+\_\+bde\+\_\+work\+::softc}}, \mbox{\hyperlink{g__bde_8h_source_l00127}{g\+\_\+bde\+\_\+key\+::zone\+\_\+cont}}, and \mbox{\hyperlink{g__bde_8h_source_l00126}{g\+\_\+bde\+\_\+key\+::zone\+\_\+width}}.



Referenced by \mbox{\hyperlink{g__bde__work_8c_source_l00752}{g\+\_\+bde\+\_\+start1()}}.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/de8/g__bde__crypt_8c_ac2890ae097fa50be721493bdd8d5b3d7_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{g__bde__crypt_8c_a70b43defa589bce1b2aa95103c5f50ab}\label{g__bde__crypt_8c_a70b43defa589bce1b2aa95103c5f50ab}} 
\index{g\_bde\_crypt.c@{g\_bde\_crypt.c}!g\_bde\_max\_sector@{g\_bde\_max\_sector}}
\index{g\_bde\_max\_sector@{g\_bde\_max\_sector}!g\_bde\_crypt.c@{g\_bde\_crypt.c}}
\doxysubsubsection{\texorpdfstring{g\_bde\_max\_sector()}{g\_bde\_max\_sector()}}
{\footnotesize\ttfamily uint64\+\_\+t g\+\_\+bde\+\_\+max\+\_\+sector (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structg__bde__key}{g\+\_\+bde\+\_\+key}} $\ast$}]{kp }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{g__bde__crypt_8c_source_l00235}{235}} of file \mbox{\hyperlink{g__bde__crypt_8c_source}{g\+\_\+bde\+\_\+crypt.\+c}}.



References \mbox{\hyperlink{g__bde_8h_source_l00128}{g\+\_\+bde\+\_\+key\+::media\+\_\+width}}, \mbox{\hyperlink{g__bde_8h_source_l00127}{g\+\_\+bde\+\_\+key\+::zone\+\_\+cont}}, and \mbox{\hyperlink{g__bde_8h_source_l00126}{g\+\_\+bde\+\_\+key\+::zone\+\_\+width}}.



Referenced by \mbox{\hyperlink{g__bde_8c_source_l00116}{g\+\_\+bde\+\_\+create\+\_\+geom()}}.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{de/de8/g__bde__crypt_8c_a70b43defa589bce1b2aa95103c5f50ab_icgraph}
\end{center}
\end{figure}
