\hypertarget{structwickr__crypto__engine}{}\doxysection{wickr\+\_\+crypto\+\_\+engine Struct Reference}
\label{structwickr__crypto__engine}\index{wickr\_crypto\_engine@{wickr\_crypto\_engine}}


Interface to a set of cryptographic operations used throughout the library. Currently the default implementation of this can be found along with documentation in \mbox{\hyperlink{openssl__suite_8h_source}{openssl\+\_\+suite.\+h}} and \mbox{\hyperlink{kdf_8h_source}{kdf.\+h}}.  




{\ttfamily \#include $<$crypto\+\_\+engine.\+h$>$}

\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structwickr__ec__curve}{wickr\+\_\+ec\+\_\+curve\+\_\+t}} \mbox{\hyperlink{structwickr__crypto__engine_a2145e35235dc5c5c944f33ea3d2963bd}{default\+\_\+curve}}
\item 
\mbox{\hyperlink{structwickr__cipher}{wickr\+\_\+cipher\+\_\+t}} \mbox{\hyperlink{structwickr__crypto__engine_a307f7d46b55b1e0a93ce9d9489ba8fc5}{default\+\_\+cipher}}
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_gae12855853c05caa473e748a62611d307}{wickr\+\_\+crypto\+\_\+engine\+\_\+crypto\+\_\+random}} )(size\+\_\+t len)
\item 
\mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_gabc120effc5248a491b18138f9b74b526}{wickr\+\_\+crypto\+\_\+engine\+\_\+cipher\+\_\+key\+\_\+random}} )(\mbox{\hyperlink{structwickr__cipher}{wickr\+\_\+cipher\+\_\+t}} cipher)
\item 
\mbox{\hyperlink{structwickr__cipher__result}{wickr\+\_\+cipher\+\_\+result\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_gaf7be0d0ca0d9e7a0c5c3b1ec0fd0918e}{wickr\+\_\+crypto\+\_\+engine\+\_\+cipher\+\_\+encrypt}} )(const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$plaintext, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$aad, const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$key, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$iv)
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga459ef821cc40edb5e3c9ce1d571ddc00}{wickr\+\_\+crypto\+\_\+engine\+\_\+cipher\+\_\+decrypt}} )(const \mbox{\hyperlink{structwickr__cipher__result}{wickr\+\_\+cipher\+\_\+result\+\_\+t}} $\ast$cipher\+\_\+result, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$aad, const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$key, bool only\+\_\+auth\+\_\+ciphers)
\item 
bool($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_gaa77b1bc373d92d9db9d801bcc4a4d29c}{wickr\+\_\+crypto\+\_\+engine\+\_\+encrypt\+\_\+file}} )(const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$key, const char $\ast$source\+File\+Path, const char $\ast$destination\+File\+Path)
\item 
bool($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga361b843efc839e30f90ce24c15b1dd27}{wickr\+\_\+crypto\+\_\+engine\+\_\+decrypt\+\_\+file}} )(const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$key, const char $\ast$source\+File\+Path, const char $\ast$destination\+File\+Path, bool only\+\_\+auth\+\_\+ciphers)
\item 
bool($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga508c8ee796eb4e5b5881d9ac15f7e1c1}{wickr\+\_\+crypto\+\_\+engine\+\_\+encrypt\+\_\+ofile}} )(FILE $\ast$fin, const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$key, FILE $\ast$fout)
\item 
bool($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_gae8edc03593fa5fa85218066a59f15c42}{wickr\+\_\+crypto\+\_\+engine\+\_\+decrypt\+\_\+ofile}} )(FILE $\ast$fin, const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$key, FILE $\ast$fout, bool only\+\_\+auth\+\_\+ciphers)
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga42dfc5b4df166616d962ee4c792ceaf4}{wickr\+\_\+crypto\+\_\+engine\+\_\+digest}} )(const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$buffer, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$salt, \mbox{\hyperlink{structwickr__digest}{wickr\+\_\+digest\+\_\+t}} digest\+\_\+mode)
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga298d2dea6722151c11e04458d3924823}{wickr\+\_\+crypto\+\_\+engine\+\_\+digest\+\_\+file}} )(FILE $\ast$in\+\_\+file, const \mbox{\hyperlink{structwickr__digest}{wickr\+\_\+digest\+\_\+t}} mode)
\item 
\mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_gad16b229b7d16cf00d3983c277ee3b88b}{wickr\+\_\+crypto\+\_\+engine\+\_\+ec\+\_\+rand\+\_\+key}} )(\mbox{\hyperlink{structwickr__ec__curve}{wickr\+\_\+ec\+\_\+curve\+\_\+t}} curve)
\item 
\mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga87a069bbd3cdf509946e4ca0ca008f8f}{wickr\+\_\+crypto\+\_\+engine\+\_\+ec\+\_\+key\+\_\+import}} )(const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$buffer, bool is\+\_\+private)
\item 
\mbox{\hyperlink{structwickr__ecdsa__result}{wickr\+\_\+ecdsa\+\_\+result\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_gac5a36d2a53e06a75a2b818e6a5cc96a1}{wickr\+\_\+crypto\+\_\+engine\+\_\+ec\+\_\+sign}} )(const \mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$ec\+\_\+signing\+\_\+key, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$data\+\_\+to\+\_\+sign, const \mbox{\hyperlink{structwickr__digest}{wickr\+\_\+digest\+\_\+t}} digest\+\_\+mode)
\item 
bool($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_gae541acc6433f6f5ffe84382ccd5e4f97}{wickr\+\_\+crypto\+\_\+engine\+\_\+ec\+\_\+verify}} )(const \mbox{\hyperlink{structwickr__ecdsa__result}{wickr\+\_\+ecdsa\+\_\+result\+\_\+t}} $\ast$signature, const \mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$ec\+\_\+public\+\_\+key, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$data\+\_\+to\+\_\+verify)
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_gab624f62e1d434c5b8222eabd656feb48}{wickr\+\_\+crypto\+\_\+engine\+\_\+gen\+\_\+shared\+\_\+secret}} )(const \mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$local, const \mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$peer)
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga782e0e8786ecf8a55c8ae2aea2f178aa}{wickr\+\_\+crypto\+\_\+engine\+\_\+hmac\+\_\+create}} )(const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$data, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$hmac\+\_\+key, \mbox{\hyperlink{structwickr__digest}{wickr\+\_\+digest\+\_\+t}} digest\+\_\+mode)
\item 
bool($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga00c52a816403192af5b21d952265d0b6}{wickr\+\_\+crypto\+\_\+engine\+\_\+hmac\+\_\+verify}} )(const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$data, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$hmac\+\_\+key, const \mbox{\hyperlink{structwickr__digest}{wickr\+\_\+digest\+\_\+t}} mode, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$expected)
\item 
\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga5ab29968c993423df83c9f1a3d7e685d}{wickr\+\_\+crypto\+\_\+kdf\+\_\+gen}} )(\mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo\+\_\+t}} algo, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$passphrase)
\item 
\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$($\ast$ \mbox{\hyperlink{group__wickr__crypto__engine_ga640cbc86ca36c4deb2c197de89dce7d1}{wickr\+\_\+crypto\+\_\+kdf\+\_\+meta}} )(const \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$existing\+\_\+meta, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$passphrase)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Interface to a set of cryptographic operations used throughout the library. Currently the default implementation of this can be found along with documentation in \mbox{\hyperlink{openssl__suite_8h_source}{openssl\+\_\+suite.\+h}} and \mbox{\hyperlink{kdf_8h_source}{kdf.\+h}}. 

\doxysubsection{Field Documentation}
\mbox{\Hypertarget{structwickr__crypto__engine_a307f7d46b55b1e0a93ce9d9489ba8fc5}\label{structwickr__crypto__engine_a307f7d46b55b1e0a93ce9d9489ba8fc5}} 
\index{wickr\_crypto\_engine@{wickr\_crypto\_engine}!default\_cipher@{default\_cipher}}
\index{default\_cipher@{default\_cipher}!wickr\_crypto\_engine@{wickr\_crypto\_engine}}
\doxysubsubsection{\texorpdfstring{default\_cipher}{default\_cipher}}
{\footnotesize\ttfamily wickr\+\_\+crypto\+\_\+engine\+::default\+\_\+cipher}

the cipher to use by default for packets, local, and remote information \mbox{\Hypertarget{structwickr__crypto__engine_a2145e35235dc5c5c944f33ea3d2963bd}\label{structwickr__crypto__engine_a2145e35235dc5c5c944f33ea3d2963bd}} 
\index{wickr\_crypto\_engine@{wickr\_crypto\_engine}!default\_curve@{default\_curve}}
\index{default\_curve@{default\_curve}!wickr\_crypto\_engine@{wickr\_crypto\_engine}}
\doxysubsubsection{\texorpdfstring{default\_curve}{default\_curve}}
{\footnotesize\ttfamily wickr\+\_\+crypto\+\_\+engine\+::default\+\_\+curve}

the curve to use when generating packets, message keys or a new context 

The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/wickrcrypto/include/wickrcrypto/crypto\+\_\+engine.\+h\end{DoxyCompactItemize}
