add onetime authentication

This commit is contained in:
Max Lv
2015-09-03 08:56:52 +08:00
parent e686d6594f
commit 42ee808681
9 changed files with 80 additions and 6 deletions
+6
View File
@@ -140,6 +140,9 @@ typedef struct {
#define SALSA20 15
#define CHACHA20 16
#define ONETIMEAUTH_BYTES 16U
#define ONETIMEAUTH_KEYBYTES 32U
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
@@ -161,4 +164,7 @@ int enc_get_iv_len(void);
void cipher_context_release(cipher_ctx_t *evp);
unsigned char *enc_md5(const unsigned char *d, size_t n, unsigned char *md);
int ss_onetimeauth(char *auth, char *msg, int msg_len);
int ss_onetimeauth_verify(char *auth, char *msg, int msg_len);
#endif // _ENCRYPT_H