tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

aes-armv8.h (5053B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 SECStatus arm_aes_encrypt_ecb_128(AESContext *cx, unsigned char *output,
      6                                  unsigned int *outputLen,
      7                                  unsigned int maxOutputLen,
      8                                  const unsigned char *input,
      9                                  unsigned int inputLen,
     10                                  unsigned int blocksize);
     11 SECStatus arm_aes_decrypt_ecb_128(AESContext *cx, unsigned char *output,
     12                                  unsigned int *outputLen,
     13                                  unsigned int maxOutputLen,
     14                                  const unsigned char *input,
     15                                  unsigned int inputLen,
     16                                  unsigned int blocksize);
     17 SECStatus arm_aes_encrypt_cbc_128(AESContext *cx, unsigned char *output,
     18                                  unsigned int *outputLen,
     19                                  unsigned int maxOutputLen,
     20                                  const unsigned char *input,
     21                                  unsigned int inputLen,
     22                                  unsigned int blocksize);
     23 SECStatus arm_aes_decrypt_cbc_128(AESContext *cx, unsigned char *output,
     24                                  unsigned int *outputLen,
     25                                  unsigned int maxOutputLen,
     26                                  const unsigned char *input,
     27                                  unsigned int inputLen,
     28                                  unsigned int blocksize);
     29 SECStatus arm_aes_encrypt_ecb_192(AESContext *cx, unsigned char *output,
     30                                  unsigned int *outputLen,
     31                                  unsigned int maxOutputLen,
     32                                  const unsigned char *input,
     33                                  unsigned int inputLen,
     34                                  unsigned int blocksize);
     35 SECStatus arm_aes_decrypt_ecb_192(AESContext *cx, unsigned char *output,
     36                                  unsigned int *outputLen,
     37                                  unsigned int maxOutputLen,
     38                                  const unsigned char *input,
     39                                  unsigned int inputLen,
     40                                  unsigned int blocksize);
     41 SECStatus arm_aes_encrypt_cbc_192(AESContext *cx, unsigned char *output,
     42                                  unsigned int *outputLen,
     43                                  unsigned int maxOutputLen,
     44                                  const unsigned char *input,
     45                                  unsigned int inputLen,
     46                                  unsigned int blocksize);
     47 SECStatus arm_aes_decrypt_cbc_192(AESContext *cx, unsigned char *output,
     48                                  unsigned int *outputLen,
     49                                  unsigned int maxOutputLen,
     50                                  const unsigned char *input,
     51                                  unsigned int inputLen,
     52                                  unsigned int blocksize);
     53 SECStatus arm_aes_encrypt_ecb_256(AESContext *cx, unsigned char *output,
     54                                  unsigned int *outputLen,
     55                                  unsigned int maxOutputLen,
     56                                  const unsigned char *input,
     57                                  unsigned int inputLen,
     58                                  unsigned int blocksize);
     59 SECStatus arm_aes_decrypt_ecb_256(AESContext *cx, unsigned char *output,
     60                                  unsigned int *outputLen,
     61                                  unsigned int maxOutputLen,
     62                                  const unsigned char *input,
     63                                  unsigned int inputLen,
     64                                  unsigned int blocksize);
     65 SECStatus arm_aes_encrypt_cbc_256(AESContext *cx, unsigned char *output,
     66                                  unsigned int *outputLen,
     67                                  unsigned int maxOutputLen,
     68                                  const unsigned char *input,
     69                                  unsigned int inputLen,
     70                                  unsigned int blocksize);
     71 SECStatus arm_aes_decrypt_cbc_256(AESContext *cx, unsigned char *output,
     72                                  unsigned int *outputLen,
     73                                  unsigned int maxOutputLen,
     74                                  const unsigned char *input,
     75                                  unsigned int inputLen,
     76                                  unsigned int blocksize);
     77 
     78 #define native_aes_init(encrypt, keysize)           \
     79    do {                                            \
     80        if (encrypt) {                              \
     81            rijndael_key_expansion(cx, key, Nk);    \
     82        } else {                                    \
     83            rijndael_invkey_expansion(cx, key, Nk); \
     84        }                                           \
     85    } while (0)