Fixed private key exporting.
[silc.git] / lib / silccrypt / aes.c
index bb78fd166bf88675fe9e366902c2a58c679686fd..020cc552d2484627afec92abe07d87e832c182c1 100644 (file)
@@ -54,6 +54,13 @@ SILC_CIPHER_API_SET_KEY(aes_cbc)
   return TRUE;
 }
 
+/* Sets IV for the cipher. */
+
+SILC_CIPHER_API_SET_IV(aes_cbc)
+{
+
+}
+
 /* Returns the size of the cipher context. */
 
 SILC_CIPHER_API_CONTEXT_LEN(aes_cbc)
@@ -124,6 +131,16 @@ SILC_CIPHER_API_SET_KEY(aes_ctr)
   return TRUE;
 }
 
+/* Sets IV for the cipher. */
+
+SILC_CIPHER_API_SET_IV(aes_ctr)
+{
+  AesContext *aes = context;
+
+  /* Starts new block. */
+  aes->u.enc.inf.b[2] = 0;
+}
+
 /* Returns the size of the cipher context. */
 
 SILC_CIPHER_API_CONTEXT_LEN(aes_ctr)
@@ -132,7 +149,7 @@ SILC_CIPHER_API_CONTEXT_LEN(aes_ctr)
 }
 
 /* Encrypts with the cipher in CTR mode. Source and destination buffers
-   maybe one and same.  Assumes MSB first ordered counter. */
+   may be one and same.  Assumes MSB first ordered counter. */
 
 SILC_CIPHER_API_ENCRYPT(aes_ctr)
 {