| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/evp/e_aria.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | typedef struct { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | ARIA_KEY ks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | } EVP_ARIA_KEY; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | typedef struct { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | union { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | double align; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | ARIA_KEY ks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | } ks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | int key_set; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | int iv_set; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | GCM128_CONTEXT gcm; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | unsigned char *iv; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | int ivlen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | int taglen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | int iv_gen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | int tls_aad_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | } EVP_ARIA_GCM_CTX; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | typedef struct { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | union { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | double align; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | ARIA_KEY ks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | } ks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | int key_set; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | int iv_set; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | int tag_set; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | int len_set; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | int L, M; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | int tls_aad_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | CCM128_CONTEXT ccm; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | ccm128_f str; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | } EVP_ARIA_CCM_CTX; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | static int aria_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | const unsigned char *iv, int enc) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | int ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | int mode = (EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & 0xF0007); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | if (enc
| 48-318 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, executed 507 times by 1 test: ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, EVP_CIPHER_CTX_get_cipher_data(ctx));Executed by:
| 507 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | EVP_CIPHER_CTX_get_cipher_data(ctx)); executed 507 times by 1 test: ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, EVP_CIPHER_CTX_get_cipher_data(ctx));Executed by:
| 507 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | ret = aria_set_decrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, executed 129 times by 1 test: ret = aria_set_decrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, EVP_CIPHER_CTX_get_cipher_data(ctx));Executed by:
| 129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | EVP_CIPHER_CTX_get_cipher_data(ctx)); executed 129 times by 1 test: ret = aria_set_decrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, EVP_CIPHER_CTX_get_cipher_data(ctx));Executed by:
| 129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | if (ret < 0
| 0-636 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | ERR_put_error(6,(185),(176),__FILE__,73); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | return executed 636 times by 1 test: 1;return 1;Executed by:
executed 636 times by 1 test: return 1;Executed by:
| 636 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | static void aria_cbc_encrypt(const unsigned char *in, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | size_t len, const ARIA_KEY *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | unsigned char *ivec, const int enc) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | if (enc
| 240-306 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | CRYPTO_cbc128_encrypt(in, out, len, key, ivec, executed 306 times by 1 test: CRYPTO_cbc128_encrypt(in, out, len, key, ivec, (block128_f) aria_encrypt);Executed by:
| 306 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | (block128_f) aria_encrypt); executed 306 times by 1 test: CRYPTO_cbc128_encrypt(in, out, len, key, ivec, (block128_f) aria_encrypt);Executed by:
| 306 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | CRYPTO_cbc128_decrypt(in, out, len, key, ivec, executed 240 times by 1 test: CRYPTO_cbc128_decrypt(in, out, len, key, ivec, (block128_f) aria_encrypt);Executed by:
| 240 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | (block128_f) aria_encrypt); executed 240 times by 1 test: CRYPTO_cbc128_decrypt(in, out, len, key, ivec, (block128_f) aria_encrypt);Executed by:
| 240 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | static void aria_cfb128_encrypt(const unsigned char *in, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | size_t length, const ARIA_KEY *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | unsigned char *ivec, int *num, const int enc) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | CRYPTO_cfb128_encrypt(in, out, length, key, ivec, num, enc, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | (block128_f) aria_encrypt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | } executed 354 times by 1 test: end of blockExecuted by:
| 354 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | static void aria_cfb1_encrypt(const unsigned char *in, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | size_t length, const ARIA_KEY *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | unsigned char *ivec, int *num, const int enc) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | CRYPTO_cfb128_1_encrypt(in, out, length, key, ivec, num, enc, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | (block128_f) aria_encrypt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | } executed 210 times by 1 test: end of blockExecuted by:
| 210 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | static void aria_cfb8_encrypt(const unsigned char *in, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | size_t length, const ARIA_KEY *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | unsigned char *ivec, int *num, const int enc) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | CRYPTO_cfb128_8_encrypt(in, out, length, key, ivec, num, enc, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | (block128_f) aria_encrypt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | } executed 354 times by 1 test: end of blockExecuted by:
| 354 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | static void aria_ecb_encrypt(const unsigned char *in, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | const ARIA_KEY *key, const int enc) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | aria_encrypt(in, out, key); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | } executed 3150 times by 1 test: end of blockExecuted by:
| 3150 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | static void aria_ofb128_encrypt(const unsigned char *in, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | size_t length, const ARIA_KEY *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | unsigned char *ivec, int *num) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | CRYPTO_ofb128_encrypt(in, out, length, key, ivec, num, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | (block128_f) aria_encrypt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | } executed 354 times by 1 test: end of blockExecuted by:
| 354 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | static int aria_128_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
never executed: if (inlend of block
executed 182 times by 1 test: returnaria_cbc_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));Executed by:
executed 182 times by 1 test: 1;return 1;Executed by:
executed 182 times by 1 test: } static int aria_128_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (128 == 1return 1;Executed by:
never executed: if (inl < chunkchunk >>= 3;
executed 118 times by 1 test: while (inlchunk = inl;Executed by:
executed 118 times by 1 test: }chunk = inl;Executed by:
executed 118 times by 1 test: returnend of blockExecuted by:
executed 118 times by 1 test: 1;return 1;Executed by:
executed 118 times by 1 test: } static int aria_128_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = EVP_CIPHER_CTX_cipher(ctx)->block_size; if (inl < blreturn 1;Executed by:
never executed: 1;return 1;never executed: inl -= bl; for (i=0; i <= inlreturn 1;
executed 1050 times by 1 test: returnaria_ecb_encrypt(in + i, out + i, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));Executed by:
executed 203 times by 1 test: 1;return 1;Executed by:
executed 203 times by 1 test: } static int aria_128_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))return 1;Executed by:
never executed: if (inlend of block
executed 118 times by 1 test: returnend of blockExecuted by:
executed 118 times by 1 test: 1;return 1;Executed by:
executed 118 times by 1 test: } static const EVP_CIPHER aria_128_cbc = { 1066, 16, 16, 16, 0 | 0x2, aria_init_key, aria_128_cbc_cipher, return 1;Executed by:
| 0-1050 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | }; const EVP_CIPHER *EVP_aria_128_cbc(void) { return executed 1962 times by 1 test: &aria_128_cbc;return &aria_128_cbc;Executed by:
executed 1962 times by 1 test: } static const EVP_CIPHER aria_128_cfb128 = { 1067, 1, 16, 16, 0 | 0x3, aria_init_key, aria_128_cfb128_cipher, return &aria_128_cbc;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | }; const EVP_CIPHER *EVP_aria_128_cfb128(void) { return executed 1962 times by 1 test: &aria_128_cfb128;return &aria_128_cfb128;Executed by:
executed 1962 times by 1 test: } static const EVP_CIPHER aria_128_ofb = { 1068, 1, 16, 16, 0 | 0x4, aria_init_key, aria_128_ofb_cipher, return &aria_128_cfb128;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | }; const EVP_CIPHER *EVP_aria_128_ofb(void) { return executed 1962 times by 1 test: &aria_128_ofb;return &aria_128_ofb;Executed by:
executed 1962 times by 1 test: } static const EVP_CIPHER aria_128_ecb = { 1065, 16, 16, 0, 0 | 0x1, aria_init_key, aria_128_ecb_cipher, return &aria_128_ofb;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | }; const EVP_CIPHER *EVP_aria_128_ecb(void) { return executed 1962 times by 1 test: &aria_128_ecb;return &aria_128_ecb;Executed by:
executed 1962 times by 1 test: }return &aria_128_ecb;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | static int aria_192_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
never executed: if (inlend of block
executed 182 times by 1 test: returnaria_cbc_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));Executed by:
executed 182 times by 1 test: 1;return 1;Executed by:
executed 182 times by 1 test: } static int aria_192_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (128 == 1return 1;Executed by:
never executed: if (inl < chunkchunk >>= 3;
executed 118 times by 1 test: while (inlchunk = inl;Executed by:
executed 118 times by 1 test: }chunk = inl;Executed by:
executed 118 times by 1 test: returnend of blockExecuted by:
executed 118 times by 1 test: 1;return 1;Executed by:
executed 118 times by 1 test: } static int aria_192_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = EVP_CIPHER_CTX_cipher(ctx)->block_size; if (inl < blreturn 1;Executed by:
never executed: 1;return 1;never executed: inl -= bl; for (i=0; i <= inlreturn 1;
executed 1050 times by 1 test: returnaria_ecb_encrypt(in + i, out + i, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));Executed by:
executed 203 times by 1 test: 1;return 1;Executed by:
executed 203 times by 1 test: } static int aria_192_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))return 1;Executed by:
never executed: if (inlend of block
executed 118 times by 1 test: returnend of blockExecuted by:
executed 118 times by 1 test: 1;return 1;Executed by:
executed 118 times by 1 test: } static const EVP_CIPHER aria_192_cbc = { 1071, 16, 24, 16, 0 | 0x2, aria_init_key, aria_192_cbc_cipher, return 1;Executed by:
| 0-1050 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | }; const EVP_CIPHER *EVP_aria_192_cbc(void) { return executed 1962 times by 1 test: &aria_192_cbc;return &aria_192_cbc;Executed by:
executed 1962 times by 1 test: } static const EVP_CIPHER aria_192_cfb128 = { 1072, 1, 24, 16, 0 | 0x3, aria_init_key, aria_192_cfb128_cipher, return &aria_192_cbc;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | }; const EVP_CIPHER *EVP_aria_192_cfb128(void) { return executed 1962 times by 1 test: &aria_192_cfb128;return &aria_192_cfb128;Executed by:
executed 1962 times by 1 test: } static const EVP_CIPHER aria_192_ofb = { 1073, 1, 24, 16, 0 | 0x4, aria_init_key, aria_192_ofb_cipher, return &aria_192_cfb128;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | }; const EVP_CIPHER *EVP_aria_192_ofb(void) { return executed 1962 times by 1 test: &aria_192_ofb;return &aria_192_ofb;Executed by:
executed 1962 times by 1 test: } static const EVP_CIPHER aria_192_ecb = { 1070, 16, 24, 0, 0 | 0x1, aria_init_key, aria_192_ecb_cipher, return &aria_192_ofb;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | }; const EVP_CIPHER *EVP_aria_192_ecb(void) { return executed 1962 times by 1 test: &aria_192_ecb;return &aria_192_ecb;Executed by:
executed 1962 times by 1 test: }return &aria_192_ecb;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | static int aria_256_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
never executed: if (inlend of block
executed 182 times by 1 test: returnaria_cbc_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));Executed by:
executed 182 times by 1 test: 1;return 1;Executed by:
executed 182 times by 1 test: } static int aria_256_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (128 == 1return 1;Executed by:
never executed: if (inl < chunkchunk >>= 3;
executed 118 times by 1 test: while (inlchunk = inl;Executed by:
executed 118 times by 1 test: }chunk = inl;Executed by:
executed 118 times by 1 test: returnend of blockExecuted by:
executed 118 times by 1 test: 1;return 1;Executed by:
executed 118 times by 1 test: } static int aria_256_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = EVP_CIPHER_CTX_cipher(ctx)->block_size; if (inl < blreturn 1;Executed by:
never executed: 1;return 1;never executed: inl -= bl; for (i=0; i <= inlreturn 1;
executed 1050 times by 1 test: returnaria_ecb_encrypt(in + i, out + i, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));Executed by:
executed 203 times by 1 test: 1;return 1;Executed by:
executed 203 times by 1 test: } static int aria_256_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))return 1;Executed by:
never executed: if (inlend of block
executed 118 times by 1 test: returnend of blockExecuted by:
executed 118 times by 1 test: 1;return 1;Executed by:
executed 118 times by 1 test: } static const EVP_CIPHER aria_256_cbc = { 1076, 16, 32, 16, 0 | 0x2, aria_init_key, aria_256_cbc_cipher, return 1;Executed by:
| 0-1050 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | }; const EVP_CIPHER *EVP_aria_256_cbc(void) { return executed 1962 times by 1 test: &aria_256_cbc;return &aria_256_cbc;Executed by:
executed 1962 times by 1 test: } static const EVP_CIPHER aria_256_cfb128 = { 1077, 1, 32, 16, 0 | 0x3, aria_init_key, aria_256_cfb128_cipher, return &aria_256_cbc;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | }; const EVP_CIPHER *EVP_aria_256_cfb128(void) { return executed 1962 times by 1 test: &aria_256_cfb128;return &aria_256_cfb128;Executed by:
executed 1962 times by 1 test: } static const EVP_CIPHER aria_256_ofb = { 1078, 1, 32, 16, 0 | 0x4, aria_init_key, aria_256_ofb_cipher, return &aria_256_cfb128;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | }; const EVP_CIPHER *EVP_aria_256_ofb(void) { return executed 1962 times by 1 test: &aria_256_ofb;return &aria_256_ofb;Executed by:
executed 1962 times by 1 test: } static const EVP_CIPHER aria_256_ecb = { 1075, 16, 32, 0, 0 | 0x1, aria_init_key, aria_256_ecb_cipher, return &aria_256_ofb;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | , sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | }; const EVP_CIPHER *EVP_aria_256_ecb(void) { return executed 1962 times by 1 test: &aria_256_ecb;return &aria_256_ecb;Executed by:
executed 1962 times by 1 test: }return &aria_256_ecb;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | static int aria_128_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (1 == 1
executed 70 times by 1 test: if (inl < chunkchunk >>= 3;Executed by:
executed 70 times by 1 test: while (inlchunk = inl;Executed by:
executed 70 times by 1 test: }chunk = inl;Executed by:
executed 70 times by 1 test: returnend of blockExecuted by:
executed 70 times by 1 test: 1;return 1;Executed by:
executed 70 times by 1 test: } static const EVP_CIPHER aria_128_cfb1 = { 1080, 1, 128/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_128_cfb1_cipher, return 1;Executed by:
| 0-70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | , sizeof(EVP_ARIA_KEY), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | }; const EVP_CIPHER *EVP_aria_128_cfb1(void) { return executed 1962 times by 1 test: &aria_128_cfb1;return &aria_128_cfb1;Executed by:
executed 1962 times by 1 test: }return &aria_128_cfb1;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | static int aria_192_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (1 == 1
executed 70 times by 1 test: if (inl < chunkchunk >>= 3;Executed by:
executed 70 times by 1 test: while (inlchunk = inl;Executed by:
executed 70 times by 1 test: }chunk = inl;Executed by:
executed 70 times by 1 test: returnend of blockExecuted by:
executed 70 times by 1 test: 1;return 1;Executed by:
executed 70 times by 1 test: } static const EVP_CIPHER aria_192_cfb1 = { 1081, 1, 192/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_192_cfb1_cipher, return 1;Executed by:
| 0-70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | , sizeof(EVP_ARIA_KEY), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | }; const EVP_CIPHER *EVP_aria_192_cfb1(void) { return executed 1962 times by 1 test: &aria_192_cfb1;return &aria_192_cfb1;Executed by:
executed 1962 times by 1 test: }return &aria_192_cfb1;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | static int aria_256_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (1 == 1
executed 70 times by 1 test: if (inl < chunkchunk >>= 3;Executed by:
executed 70 times by 1 test: while (inlchunk = inl;Executed by:
executed 70 times by 1 test: }chunk = inl;Executed by:
executed 70 times by 1 test: returnend of blockExecuted by:
executed 70 times by 1 test: 1;return 1;Executed by:
executed 70 times by 1 test: } static const EVP_CIPHER aria_256_cfb1 = { 1082, 1, 256/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_256_cfb1_cipher, return 1;Executed by:
| 0-70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | , sizeof(EVP_ARIA_KEY), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | }; const EVP_CIPHER *EVP_aria_256_cfb1(void) { return executed 1962 times by 1 test: &aria_256_cfb1;return &aria_256_cfb1;Executed by:
executed 1962 times by 1 test: }return &aria_256_cfb1;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | static int aria_128_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (8 == 1
never executed: if (inl < chunkchunk >>= 3;
executed 118 times by 1 test: while (inlchunk = inl;Executed by:
executed 118 times by 1 test: }chunk = inl;Executed by:
executed 118 times by 1 test: returnend of blockExecuted by:
executed 118 times by 1 test: 1;return 1;Executed by:
executed 118 times by 1 test: } static const EVP_CIPHER aria_128_cfb8 = { 1083, 1, 128/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_128_cfb8_cipher, return 1;Executed by:
| 0-118 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | , sizeof(EVP_ARIA_KEY), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | }; const EVP_CIPHER *EVP_aria_128_cfb8(void) { return executed 1962 times by 1 test: &aria_128_cfb8;return &aria_128_cfb8;Executed by:
executed 1962 times by 1 test: }return &aria_128_cfb8;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | static int aria_192_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (8 == 1
never executed: if (inl < chunkchunk >>= 3;
executed 118 times by 1 test: while (inlchunk = inl;Executed by:
executed 118 times by 1 test: }chunk = inl;Executed by:
executed 118 times by 1 test: returnend of blockExecuted by:
executed 118 times by 1 test: 1;return 1;Executed by:
executed 118 times by 1 test: } static const EVP_CIPHER aria_192_cfb8 = { 1084, 1, 192/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_192_cfb8_cipher, return 1;Executed by:
| 0-118 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | , sizeof(EVP_ARIA_KEY), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | }; const EVP_CIPHER *EVP_aria_192_cfb8(void) { return executed 1962 times by 1 test: &aria_192_cfb8;return &aria_192_cfb8;Executed by:
executed 1962 times by 1 test: }return &aria_192_cfb8;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | static int aria_256_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (8 == 1
never executed: if (inl < chunkchunk >>= 3;
executed 118 times by 1 test: while (inlchunk = inl;Executed by:
executed 118 times by 1 test: }chunk = inl;Executed by:
executed 118 times by 1 test: returnend of blockExecuted by:
executed 118 times by 1 test: 1;return 1;Executed by:
executed 118 times by 1 test: } static const EVP_CIPHER aria_256_cfb8 = { 1085, 1, 256/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_256_cfb8_cipher, return 1;Executed by:
| 0-118 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | , sizeof(EVP_ARIA_KEY), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | }; const EVP_CIPHER *EVP_aria_256_cfb8(void) { return executed 1962 times by 1 test: &aria_256_cfb8;return &aria_256_cfb8;Executed by:
executed 1962 times by 1 test: }return &aria_256_cfb8;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | static int aria_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | const unsigned char *in, size_t len) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | unsigned int num = EVP_CIPHER_CTX_num(ctx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | EVP_ARIA_KEY *dat = ((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | CRYPTO_ctr128_encrypt(in, out, len, &dat->ks, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | EVP_CIPHER_CTX_iv_noconst(ctx), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | EVP_CIPHER_CTX_buf_noconst(ctx), &num, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | (block128_f) aria_encrypt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | EVP_CIPHER_CTX_set_num(ctx, num); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | return executed 354 times by 1 test: 1;return 1;Executed by:
executed 354 times by 1 test: return 1;Executed by:
| 354 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | static const EVP_CIPHER aria_128_ctr = { 1069,1,128/8,16, 0|0x5, aria_init_key, aria_ctr_cipher, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | , sizeof(EVP_ARIA_KEY), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | }; const EVP_CIPHER *EVP_aria_128_ctr(void) { return executed 1962 times by 1 test: &aria_128_ctr;return &aria_128_ctr;Executed by:
executed 1962 times by 1 test: }return &aria_128_ctr;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | static const EVP_CIPHER aria_192_ctr = { 1074,1,192/8,16, 0|0x5, aria_init_key, aria_ctr_cipher, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | , sizeof(EVP_ARIA_KEY), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | }; const EVP_CIPHER *EVP_aria_192_ctr(void) { return executed 1962 times by 1 test: &aria_192_ctr;return &aria_192_ctr;Executed by:
executed 1962 times by 1 test: }return &aria_192_ctr;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | static const EVP_CIPHER aria_256_ctr = { 1079,1,256/8,16, 0|0x5, aria_init_key, aria_ctr_cipher, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | , sizeof(EVP_ARIA_KEY), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | }; const EVP_CIPHER *EVP_aria_256_ctr(void) { return executed 1962 times by 1 test: &aria_256_ctr;return &aria_256_ctr;Executed by:
executed 1962 times by 1 test: }return &aria_256_ctr;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | static void ctr64_inc(unsigned char *counter) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | int n = 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | unsigned char c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | --n; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | c = counter[n]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | ++c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | counter[n] = c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | if (c
| 0-206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | return; executed 206 times by 1 test: return;Executed by:
| 206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | } never executed: while (nend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | static int aria_gcm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | const unsigned char *iv, int enc) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | int ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | EVP_ARIA_GCM_CTX *gctx = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | if (!iv
| 48-207 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | return executed 48 times by 1 test: 1;return 1;Executed by:
executed 48 times by 1 test: return 1;Executed by:
| 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | if (key
| 0-207 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | &gctx->ks.ks); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | (block128_f) aria_encrypt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | if (ret < 0
| 0-207 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | ERR_put_error(6,(176),(176),__FILE__,221); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | if (iv ==
| 48-159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | ((void *)0)
| 48-159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | && gctx->iv_set
| 0-159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | iv = gctx->iv; never executed: iv = gctx->iv; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | if (iv
| 48-159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | gctx->iv_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | } executed 48 times by 1 test: end of blockExecuted by:
| 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | gctx->key_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | } executed 207 times by 1 test: else {end of blockExecuted by:
| 207 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | if (gctx->key_set
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); never executed: CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | memcpy(gctx->iv, iv, gctx->ivlen); never executed: memcpy(gctx->iv, iv, gctx->ivlen); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | gctx->iv_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | gctx->iv_gen = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | return executed 207 times by 1 test: 1;return 1;Executed by:
executed 207 times by 1 test: return 1;Executed by:
| 207 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | static int aria_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | EVP_ARIA_GCM_CTX *gctx = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(c)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | switch (type) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | case executed 207 times by 1 test: 0x0:case 0x0:Executed by:
executed 207 times by 1 test: case 0x0:Executed by:
| 207 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | gctx->key_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | gctx->iv_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | gctx->ivlen = EVP_CIPHER_CTX_iv_length(c); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | gctx->iv = EVP_CIPHER_CTX_iv_noconst(c); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | gctx->taglen = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | gctx->iv_gen = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | gctx->tls_aad_len = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | return executed 207 times by 1 test: 1;return 1;Executed by:
executed 207 times by 1 test: return 1;Executed by:
| 207 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | case executed 48 times by 1 test: 0x9:case 0x9:Executed by:
executed 48 times by 1 test: case 0x9:Executed by:
| 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | if (arg <= 0
| 0-48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | if ((
| 0-48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | if (gctx->iv != EVP_CIPHER_CTX_iv_noconst(c)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | CRYPTO_free(gctx->iv, __FILE__, 268); never executed: CRYPTO_free(gctx->iv, __FILE__, 268); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | ERR_put_error(6,(197),((1|64)),__FILE__,270); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | gctx->ivlen = arg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | return executed 48 times by 1 test: 1;return 1;Executed by:
executed 48 times by 1 test: return 1;Executed by:
| 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | case executed 24 times by 1 test: 0x11:case 0x11:Executed by:
executed 24 times by 1 test: case 0x11:Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | if (arg <= 0
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | memcpy(EVP_CIPHER_CTX_buf_noconst(c), ptr, arg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | gctx->taglen = arg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | return executed 24 times by 1 test: 1;return 1;Executed by:
executed 24 times by 1 test: return 1;Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | case executed 24 times by 1 test: 0x10:case 0x10:Executed by:
executed 24 times by 1 test: case 0x10:Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | if (arg <= 0
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | || gctx->taglen < 0
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | memcpy(ptr, EVP_CIPHER_CTX_buf_noconst(c), arg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | return executed 24 times by 1 test: 1;return 1;Executed by:
executed 24 times by 1 test: return 1;Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | case executed 159 times by 1 test: 0x12:case 0x12:Executed by:
executed 159 times by 1 test: case 0x12:Executed by:
| 159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | if (arg == -1
| 0-159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | memcpy(gctx->iv, ptr, gctx->ivlen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | gctx->iv_gen = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | if ((
| 0-159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | if (arg
| 0-159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | memcpy(gctx->iv, ptr, arg); executed 159 times by 1 test: memcpy(gctx->iv, ptr, arg);Executed by:
| 159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | if (EVP_CIPHER_CTX_encrypting(c)
| 65-94 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | && RAND_bytes(gctx->iv + arg, gctx->ivlen - arg) <= 0
| 0-65 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | gctx->iv_gen = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | return executed 159 times by 1 test: 1;return 1;Executed by:
executed 159 times by 1 test: return 1;Executed by:
| 159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | case executed 206 times by 1 test: 0x13:case 0x13:Executed by:
executed 206 times by 1 test: case 0x13:Executed by:
| 206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | if (gctx->iv_gen == 0
| 0-206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | if (arg <= 0
| 0-206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | arg = gctx->ivlen; never executed: arg = gctx->ivlen; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | memcpy(ptr, gctx->iv + gctx->ivlen - arg, arg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | ctr64_inc(gctx->iv + gctx->ivlen - 8); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | gctx->iv_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | return executed 206 times by 1 test: 1;return 1;Executed by:
executed 206 times by 1 test: return 1;Executed by:
| 206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | case executed 111 times by 1 test: 0x18:case 0x18:Executed by:
executed 111 times by 1 test: case 0x18:Executed by:
| 111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | if (gctx->iv_gen == 0
| 0-111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | || EVP_CIPHER_CTX_encrypting(c)
| 0-111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | memcpy(gctx->iv + gctx->ivlen - arg, ptr, arg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | gctx->iv_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | return executed 111 times by 1 test: 1;return 1;Executed by:
executed 111 times by 1 test: return 1;Executed by:
| 111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | case executed 321 times by 1 test: 0x16:case 0x16:Executed by:
executed 321 times by 1 test: case 0x16:Executed by:
| 321 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | if (arg != 13
| 0-321 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | memcpy(EVP_CIPHER_CTX_buf_noconst(c), ptr, arg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | gctx->tls_aad_len = arg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | unsigned int len = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | EVP_CIPHER_CTX_buf_noconst(c)[arg - 2] << 8 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | | EVP_CIPHER_CTX_buf_noconst(c)[arg - 1]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | if (len < 8
| 2-319 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | return executed 2 times by 1 test: 0;return 0;Executed by:
executed 2 times by 1 test: return 0;Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | len -= 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | if (!EVP_CIPHER_CTX_encrypting(c)
| 113-206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | if (len < 16
| 2-111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | return executed 2 times by 1 test: 0;return 0;Executed by:
executed 2 times by 1 test: return 0;Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | len -= 16; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | } executed 111 times by 1 test: end of blockExecuted by:
| 111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | EVP_CIPHER_CTX_buf_noconst(c)[arg - 2] = len >> 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | EVP_CIPHER_CTX_buf_noconst(c)[arg - 1] = len & 0xff; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | return executed 317 times by 1 test: 16;return 16;Executed by:
executed 317 times by 1 test: return 16;Executed by:
| 317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | case never executed: 0x8:case 0x8:never executed: case 0x8: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | EVP_CIPHER_CTX *out = ptr; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | EVP_ARIA_GCM_CTX *gctx_out = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(out)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | if (gctx->gcm.key
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | if (gctx->gcm.key != &gctx->ks
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | gctx_out->gcm.key = &gctx_out->ks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | if (gctx->iv == EVP_CIPHER_CTX_iv_noconst(c)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out); never executed: gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | ERR_put_error(6,(197),((1|64)),__FILE__,375); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | memcpy(gctx_out->iv, gctx->iv, gctx->ivlen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | static int aria_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | const unsigned char *in, size_t len) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | EVP_ARIA_GCM_CTX *gctx = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | int rv = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | if (out != in
| 0-317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | || len < (8 + 16)
| 0-317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CIPHER_CTX_encrypting(ctx) ?
| 0-317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | 0x13 : 0x18,
| 0-317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | 8, out) <= 0
| 0-317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | if (CRYPTO_gcm128_aad(&gctx->gcm, EVP_CIPHER_CTX_buf_noconst(ctx),
| 0-317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | gctx->tls_aad_len)
| 0-317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | in += 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | out += 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | len -= 8 + 16; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | if (EVP_CIPHER_CTX_encrypting(ctx)
| 111-206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | if (CRYPTO_gcm128_encrypt(&gctx->gcm, in, out, len)
| 0-206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | out += len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | CRYPTO_gcm128_tag(&gctx->gcm, out, 16); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | rv = len + 8 + 16; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | } executed 206 times by 1 test: else {end of blockExecuted by:
| 206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | if (CRYPTO_gcm128_decrypt(&gctx->gcm, in, out, len)
| 0-111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | CRYPTO_gcm128_tag(&gctx->gcm, EVP_CIPHER_CTX_buf_noconst(ctx), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | 16); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | if (CRYPTO_memcmp(EVP_CIPHER_CTX_buf_noconst(ctx), in + len,
| 46-65 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | 16)
| 46-65 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | OPENSSL_cleanse(out, len); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | goto executed 65 times by 1 test: err;goto err;Executed by:
executed 65 times by 1 test: goto err;Executed by:
| 65 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | rv = len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | } executed 46 times by 1 test: end of blockExecuted by:
| 46 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | err: code before this statement executed 252 times by 1 test: err:Executed by:
| 252 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | gctx->iv_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | gctx->tls_aad_len = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | return executed 317 times by 1 test: rv;return rv;Executed by:
executed 317 times by 1 test: return rv;Executed by:
| 317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 571 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 573 | static int aria_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 574 | const unsigned char *in, size_t len) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 576 | EVP_ARIA_GCM_CTX *gctx = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 578 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | if (!gctx->key_set
| 0-557 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | if (gctx->tls_aad_len >= 0
| 240-317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | return executed 317 times by 1 test: aria_gcm_tls_cipher(ctx, out, in, len);return aria_gcm_tls_cipher(ctx, out, in, len);Executed by:
executed 317 times by 1 test: return aria_gcm_tls_cipher(ctx, out, in, len);Executed by:
| 317 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 585 | if (!gctx->iv_set
| 0-240 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 586 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 587 | if (in
| 48-192 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 588 | if (out ==
| 96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 589 | ((void *)0)
| 96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 590 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 591 | if (CRYPTO_gcm128_aad(&gctx->gcm, in, len)
| 0-96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 592 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 593 | } executed 96 times by 1 test: else if (EVP_CIPHER_CTX_encrypting(ctx)end of blockExecuted by:
| 48-96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 594 | if (CRYPTO_gcm128_encrypt(&gctx->gcm, in, out, len)
| 0-48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 595 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 596 | } executed 48 times by 1 test: else {end of blockExecuted by:
| 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 597 | if (CRYPTO_gcm128_decrypt(&gctx->gcm, in, out, len)
| 0-48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 598 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 599 | } executed 48 times by 1 test: end of blockExecuted by:
| 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 600 | return executed 192 times by 1 test: len;return len;Executed by:
executed 192 times by 1 test: return len;Executed by:
| 192 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 601 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 602 | if (!EVP_CIPHER_CTX_encrypting(ctx)
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 603 | if (gctx->taglen < 0
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 604 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 605 | if (CRYPTO_gcm128_finish(&gctx->gcm,
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 606 | EVP_CIPHER_CTX_buf_noconst(ctx),
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 607 | gctx->taglen) != 0
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 608 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 609 | gctx->iv_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 610 | return executed 24 times by 1 test: 0;return 0;Executed by:
executed 24 times by 1 test: return 0;Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 611 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 612 | CRYPTO_gcm128_tag(&gctx->gcm, EVP_CIPHER_CTX_buf_noconst(ctx), 16); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 613 | gctx->taglen = 16; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 614 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 615 | gctx->iv_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 616 | return executed 24 times by 1 test: 0;return 0;Executed by:
executed 24 times by 1 test: return 0;Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 617 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 618 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 619 | static int aria_ccm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 620 | const unsigned char *iv, int enc) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 621 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 622 | int ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 623 | EVP_ARIA_CCM_CTX *cctx = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 624 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 625 | if (!iv
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 626 | return executed 72 times by 1 test: 1;return 1;Executed by:
executed 72 times by 1 test: return 1;Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 627 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 628 | if (key
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 629 | ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 630 | &cctx->ks.ks); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 632 | &cctx->ks, (block128_f) aria_encrypt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 633 | if (ret < 0
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 634 | ERR_put_error(6,(175),(176),__FILE__,504); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 635 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 636 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 637 | cctx->str = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 638 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 639 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 640 | cctx->key_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 641 | } executed 72 times by 1 test: end of blockExecuted by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 642 | if (iv
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 643 | memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), iv, 15 - cctx->L); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 644 | cctx->iv_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 645 | } executed 72 times by 1 test: end of blockExecuted by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 646 | return executed 72 times by 1 test: 1;return 1;Executed by:
executed 72 times by 1 test: return 1;Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 647 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 648 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 649 | static int aria_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 650 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 651 | EVP_ARIA_CCM_CTX *cctx = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(c)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 652 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 653 | switch (type) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 654 | case executed 72 times by 1 test: 0x0:case 0x0:Executed by:
executed 72 times by 1 test: case 0x0:Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 655 | cctx->key_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 656 | cctx->iv_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 657 | cctx->L = 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 658 | cctx->M = 12; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 659 | cctx->tag_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 660 | cctx->len_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 661 | cctx->tls_aad_len = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 662 | return executed 72 times by 1 test: 1;return 1;Executed by:
executed 72 times by 1 test: return 1;Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 664 | case never executed: 0x16:case 0x16:never executed: case 0x16: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 665 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 666 | if (arg != 13
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 667 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 668 | memcpy(EVP_CIPHER_CTX_buf_noconst(c), ptr, arg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 669 | cctx->tls_aad_len = arg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 670 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 671 | uint16_t len = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 672 | EVP_CIPHER_CTX_buf_noconst(c)[arg - 2] << 8 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 673 | | EVP_CIPHER_CTX_buf_noconst(c)[arg - 1]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 674 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 675 | if (len < 8
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 676 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 677 | len -= 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 678 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 679 | if (!EVP_CIPHER_CTX_encrypting(c)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 680 | if (len < cctx->M
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 681 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 682 | len -= cctx->M; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 683 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 684 | EVP_CIPHER_CTX_buf_noconst(c)[arg - 2] = len >> 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 685 | EVP_CIPHER_CTX_buf_noconst(c)[arg - 1] = len & 0xff; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 686 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 687 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 688 | return never executed: cctx->M;return cctx->M;never executed: return cctx->M; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 689 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 690 | case never executed: 0x12:case 0x12:never executed: case 0x12: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 691 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 692 | if (arg != 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 693 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 694 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 695 | memcpy(EVP_CIPHER_CTX_iv_noconst(c), ptr, arg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 696 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 697 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 698 | case executed 72 times by 1 test: 0x9:case 0x9:Executed by:
executed 72 times by 1 test: case 0x9:Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 699 | arg = 15 - arg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 700 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 701 | case never executed: case 0x14:code before this statement executed 72 times by 1 test: case 0x14:Executed by:
never executed: 0x14:case 0x14:code before this statement executed 72 times by 1 test: case 0x14:Executed by:
never executed: case 0x14: | 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 702 | if (arg < 2
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 703 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 704 | cctx->L = arg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 705 | return executed 72 times by 1 test: 1;return 1;Executed by:
executed 72 times by 1 test: return 1;Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 706 | case executed 72 times by 1 test: 0x11:case 0x11:Executed by:
executed 72 times by 1 test: case 0x11:Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 707 | if ((
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 708 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 709 | if (EVP_CIPHER_CTX_encrypting(c)
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 710 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 711 | if (ptr
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 712 | cctx->tag_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 713 | memcpy(EVP_CIPHER_CTX_buf_noconst(c), ptr, arg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 714 | } executed 36 times by 1 test: end of blockExecuted by:
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 715 | cctx->M = arg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 716 | return executed 72 times by 1 test: 1;return 1;Executed by:
executed 72 times by 1 test: return 1;Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 717 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 718 | case executed 36 times by 1 test: 0x10:case 0x10:Executed by:
executed 36 times by 1 test: case 0x10:Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 719 | if (!EVP_CIPHER_CTX_encrypting(c)
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 720 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 721 | if (!CRYPTO_ccm128_tag(&cctx->ccm, ptr, (size_t)arg)
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 722 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 723 | cctx->tag_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 724 | cctx->iv_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 725 | cctx->len_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 726 | return executed 36 times by 1 test: 1;return 1;Executed by:
executed 36 times by 1 test: return 1;Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 727 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 728 | case never executed: 0x8:case 0x8:never executed: case 0x8: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 729 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 730 | EVP_CIPHER_CTX *out = ptr; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 731 | EVP_ARIA_CCM_CTX *cctx_out = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(out)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 732 | if (cctx->ccm.key
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 733 | if (cctx->ccm.key != &cctx->ks
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 734 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 735 | cctx_out->ccm.key = &cctx_out->ks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 736 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 737 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 738 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 739 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 740 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 741 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 742 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 743 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 744 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 745 | static int aria_ccm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 746 | const unsigned char *in, size_t len) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 747 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 748 | EVP_ARIA_CCM_CTX *cctx = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 749 | CCM128_CONTEXT *ccm = &cctx->ccm; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 751 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 752 | if (out != in
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 753 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 754 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 755 | if (EVP_CIPHER_CTX_encrypting(ctx)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 756 | memcpy(out, EVP_CIPHER_CTX_buf_noconst(ctx), never executed: memcpy(out, EVP_CIPHER_CTX_buf_noconst(ctx), 8); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 757 | 8); never executed: memcpy(out, EVP_CIPHER_CTX_buf_noconst(ctx), 8); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 758 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 759 | memcpy(EVP_CIPHER_CTX_iv_noconst(ctx) + 4, in, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 760 | 8); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 761 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 762 | len -= 8 + cctx->M; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 763 | if (CRYPTO_ccm128_setiv(ccm, EVP_CIPHER_CTX_iv_noconst(ctx), 15 - cctx->L,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 764 | len)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 765 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 766 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 767 | CRYPTO_ccm128_aad(ccm, EVP_CIPHER_CTX_buf_noconst(ctx), cctx->tls_aad_len); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 768 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 769 | in += 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 770 | out += 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 771 | if (EVP_CIPHER_CTX_encrypting(ctx)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 772 | if (cctx->str
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 773 | : CRYPTO_ccm128_encrypt(ccm, in, out, len)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 774 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 775 | if (!CRYPTO_ccm128_tag(ccm, out + len, cctx->M)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 776 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 777 | return never executed: len + 8 + cctx->M;return len + 8 + cctx->M;never executed: return len + 8 + cctx->M; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 778 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 779 | if (cctx->str
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 780 | : !CRYPTO_ccm128_decrypt(ccm, in, out, len)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 781 | unsigned char tag[16]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 782 | if (CRYPTO_ccm128_tag(ccm, tag, cctx->M)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 783 | if (!CRYPTO_memcmp(tag, in + len, cctx->M)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 784 | return never executed: len;return len;never executed: return len; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 785 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 786 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 787 | OPENSSL_cleanse(out, len); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 788 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 789 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 790 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 791 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 792 | static int aria_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 793 | const unsigned char *in, size_t len) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 794 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 795 | EVP_ARIA_CCM_CTX *cctx = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 796 | CCM128_CONTEXT *ccm = &cctx->ccm; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 797 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 798 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 799 | if (!cctx->key_set
| 0-288 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 800 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 801 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 802 | if (cctx->tls_aad_len >= 0
| 0-288 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 803 | return never executed: aria_ccm_tls_cipher(ctx, out, in, len);return aria_ccm_tls_cipher(ctx, out, in, len);never executed: return aria_ccm_tls_cipher(ctx, out, in, len); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 804 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 805 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 806 | if (in ==
| 144 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 807 | ((void *)0)
| 144 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 808 | && out !=
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 809 | ((void *)0)
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 810 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 811 | return executed 72 times by 1 test: 0;return 0;Executed by:
executed 72 times by 1 test: return 0;Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 812 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 813 | if (!cctx->iv_set
| 0-216 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 814 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 815 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 816 | if (!EVP_CIPHER_CTX_encrypting(ctx)
| 0-108 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 817 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 818 | if (!out
| 72-144 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 819 | if (!in
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 820 | if (CRYPTO_ccm128_setiv(ccm, EVP_CIPHER_CTX_iv_noconst(ctx),
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 821 | 15 - cctx->L, len)
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 822 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 823 | cctx->len_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 824 | return executed 72 times by 1 test: len;return len;Executed by:
executed 72 times by 1 test: return len;Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 825 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 826 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 827 | if (!cctx->len_set
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 828 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 829 | CRYPTO_ccm128_aad(ccm, in, len); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 830 | return executed 72 times by 1 test: len;return len;Executed by:
executed 72 times by 1 test: return len;Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 831 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 832 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 833 | if (!cctx->len_set
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 834 | if (CRYPTO_ccm128_setiv(ccm, EVP_CIPHER_CTX_iv_noconst(ctx),
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 835 | 15 - cctx->L, len)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 836 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 837 | cctx->len_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 838 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 839 | if (EVP_CIPHER_CTX_encrypting(ctx)
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 840 | if (cctx->str
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 841 | : CRYPTO_ccm128_encrypt(ccm, in, out, len)
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 842 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 843 | cctx->tag_set = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 844 | return executed 36 times by 1 test: len;return len;Executed by:
executed 36 times by 1 test: return len;Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 845 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 846 | int rv = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 847 | if (cctx->str
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 848 | cctx->str) :
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 849 | !CRYPTO_ccm128_decrypt(ccm, in, out, len)
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 850 | unsigned char tag[16]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 851 | if (CRYPTO_ccm128_tag(ccm, tag, cctx->M)
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 852 | if (!CRYPTO_memcmp(tag, EVP_CIPHER_CTX_buf_noconst(ctx),
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 853 | cctx->M)
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 854 | rv = len; executed 36 times by 1 test: rv = len;Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 855 | } executed 36 times by 1 test: end of blockExecuted by:
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 856 | } executed 36 times by 1 test: end of blockExecuted by:
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 857 | if (rv == -1
| 0-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 858 | OPENSSL_cleanse(out, len); never executed: OPENSSL_cleanse(out, len); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 859 | cctx->iv_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 860 | cctx->tag_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 861 | cctx->len_set = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 862 | return executed 36 times by 1 test: rv;return rv;Executed by:
executed 36 times by 1 test: return rv;Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 863 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 864 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 865 | static const EVP_CIPHER aria_128_gcm = { 1123, 1, 128/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x6, aria_gcm_init_key, aria_gcm_cipher, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 866 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 867 | , sizeof(EVP_ARIA_GCM_CTX), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 868 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 869 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 870 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 871 | ,aria_gcm_ctrl, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 872 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 873 | }; const EVP_CIPHER *EVP_aria_128_gcm(void) { return executed 3920 times by 1 test: (EVP_CIPHER*)&aria_128_gcm;return (EVP_CIPHER*)&aria_128_gcm;Executed by:
executed 3920 times by 1 test: }return (EVP_CIPHER*)&aria_128_gcm;Executed by:
| 3920 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 874 | static const EVP_CIPHER aria_192_gcm = { 1124, 1, 192/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x6, aria_gcm_init_key, aria_gcm_cipher, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 875 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 876 | , sizeof(EVP_ARIA_GCM_CTX), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 877 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 878 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 879 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 880 | ,aria_gcm_ctrl, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 881 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 882 | }; const EVP_CIPHER *EVP_aria_192_gcm(void) { return executed 1962 times by 1 test: (EVP_CIPHER*)&aria_192_gcm;return (EVP_CIPHER*)&aria_192_gcm;Executed by:
executed 1962 times by 1 test: }return (EVP_CIPHER*)&aria_192_gcm;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 883 | static const EVP_CIPHER aria_256_gcm = { 1125, 1, 256/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x6, aria_gcm_init_key, aria_gcm_cipher, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 884 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 885 | , sizeof(EVP_ARIA_GCM_CTX), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 886 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 887 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 888 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 889 | ,aria_gcm_ctrl, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 890 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 891 | }; const EVP_CIPHER *EVP_aria_256_gcm(void) { return executed 3920 times by 1 test: (EVP_CIPHER*)&aria_256_gcm;return (EVP_CIPHER*)&aria_256_gcm;Executed by:
executed 3920 times by 1 test: }return (EVP_CIPHER*)&aria_256_gcm;Executed by:
| 3920 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 892 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 893 | static const EVP_CIPHER aria_128_ccm = { 1120, 1, 128/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x7, aria_ccm_init_key, aria_ccm_cipher, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 894 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 895 | , sizeof(EVP_ARIA_CCM_CTX), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 896 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 897 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 898 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 899 | ,aria_ccm_ctrl, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 900 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 901 | }; const EVP_CIPHER *EVP_aria_128_ccm(void) { return executed 1962 times by 1 test: (EVP_CIPHER*)&aria_128_ccm;return (EVP_CIPHER*)&aria_128_ccm;Executed by:
executed 1962 times by 1 test: }return (EVP_CIPHER*)&aria_128_ccm;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 902 | static const EVP_CIPHER aria_192_ccm = { 1121, 1, 192/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x7, aria_ccm_init_key, aria_ccm_cipher, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 903 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 904 | , sizeof(EVP_ARIA_CCM_CTX), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 905 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 906 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 907 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 908 | ,aria_ccm_ctrl, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 909 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 910 | }; const EVP_CIPHER *EVP_aria_192_ccm(void) { return executed 1962 times by 1 test: (EVP_CIPHER*)&aria_192_ccm;return (EVP_CIPHER*)&aria_192_ccm;Executed by:
executed 1962 times by 1 test: }return (EVP_CIPHER*)&aria_192_ccm;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 911 | static const EVP_CIPHER aria_256_ccm = { 1122, 1, 256/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x7, aria_ccm_init_key, aria_ccm_cipher, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 912 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 913 | , sizeof(EVP_ARIA_CCM_CTX), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 914 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 915 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 916 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 917 | ,aria_ccm_ctrl, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 918 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 919 | }; const EVP_CIPHER *EVP_aria_256_ccm(void) { return executed 1962 times by 1 test: (EVP_CIPHER*)&aria_256_ccm;return (EVP_CIPHER*)&aria_256_ccm;Executed by:
executed 1962 times by 1 test: }return (EVP_CIPHER*)&aria_256_ccm;Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |