| OLD | NEW |
| 1 /******************************************************************************/ | 1 /******************************************************************************/ |
| 2 /* LICENSE: */ | 2 /* LICENSE: */ |
| 3 /* This submission to NSS is to be made available under the terms of the */ | 3 /* This submission to NSS is to be made available under the terms of the */ |
| 4 /* Mozilla Public License, v. 2.0. You can obtain one at http: */ | 4 /* Mozilla Public License, v. 2.0. You can obtain one at http: */ |
| 5 /* //mozilla.org/MPL/2.0/. */ | 5 /* //mozilla.org/MPL/2.0/. */ |
| 6 /******************************************************************************/ | 6 /******************************************************************************/ |
| 7 /* Copyright(c) 2013, Intel Corp. */ | 7 /* Copyright(c) 2013, Intel Corp. */ |
| 8 /******************************************************************************/ | 8 /******************************************************************************/ |
| 9 /* Reference: */ | 9 /* Reference: */ |
| 10 /* [1] Shay Gueron, Michael E. Kounavis: IntelĀ® Carry-Less Multiplication */ | 10 /* [1] Shay Gueron, Michael E. Kounavis: IntelĀ® Carry-Less Multiplication */ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #include "blapii.h" | 25 #include "blapii.h" |
| 26 | 26 |
| 27 typedef struct intel_AES_GCMContextStr intel_AES_GCMContext; | 27 typedef struct intel_AES_GCMContextStr intel_AES_GCMContext; |
| 28 | 28 |
| 29 intel_AES_GCMContext *intel_AES_GCM_CreateContext(void *context, freeblCipherFun
c cipher, | 29 intel_AES_GCMContext *intel_AES_GCM_CreateContext(void *context, freeblCipherFun
c cipher, |
| 30 const unsigned char *params, unsigned int blocksize); | 30 const unsigned char *params, unsigned int blocksize); |
| 31 | 31 |
| 32 void intel_AES_GCM_DestroyContext(intel_AES_GCMContext *gcm, PRBool freeit); | 32 void intel_AES_GCM_DestroyContext(intel_AES_GCMContext *gcm, PRBool freeit); |
| 33 | 33 |
| 34 SECStatus intel_AES_GCM_EncryptUpdate(intel_AES_GCMContext *gcm, unsigned char
*outbuf, | 34 SECStatus intel_AES_GCM_EncryptUpdate(intel_AES_GCMContext *gcm, unsigned char *
outbuf, |
| 35 unsigned int *outlen, unsigned int maxout, | 35 unsigned int *outlen, unsigned int maxout, |
| 36 const unsigned char *inbuf, unsigned int inlen, | 36 const unsigned char *inbuf, unsigned int inlen, |
| 37 unsigned int blocksize); | 37 unsigned int blocksize); |
| 38 | 38 |
| 39 SECStatus intel_AES_GCM_DecryptUpdate(intel_AES_GCMContext *gcm, unsigned char *
outbuf, | 39 SECStatus intel_AES_GCM_DecryptUpdate(intel_AES_GCMContext *gcm, unsigned char *
outbuf, |
| 40 unsigned int *outlen, unsigned int maxout, | 40 unsigned int *outlen, unsigned int maxout, |
| 41 const unsigned char *inbuf, unsigned int inlen, | 41 const unsigned char *inbuf, unsigned int inlen, |
| 42 unsigned int blocksize); | 42 unsigned int blocksize); |
| 43 | 43 |
| 44 /* Prorotypes of functions in the assembler file for fast AES-GCM, using | 44 /* Prorotypes of functions in the assembler file for fast AES-GCM, using |
| (...skipping 29 matching lines...) Expand all Loading... |
| 74 void *Gctx, | 74 void *Gctx, |
| 75 unsigned long len); | 75 unsigned long len); |
| 76 | 76 |
| 77 /* Similar to ENC, but decrypts the Ciphertext. */ | 77 /* Similar to ENC, but decrypts the Ciphertext. */ |
| 78 void intel_aes_gcmDEC(const unsigned char* CT, | 78 void intel_aes_gcmDEC(const unsigned char* CT, |
| 79 unsigned char* PT, | 79 unsigned char* PT, |
| 80 void *Gctx, | 80 void *Gctx, |
| 81 unsigned long len); | 81 unsigned long len); |
| 82 | 82 |
| 83 #endif | 83 #endif |
| OLD | NEW |