/dports/net/chrony-lite/chrony-4.2/ |
H A D | nts_ntp_auth.c | 40 uint16_t nonce_length; member 75 if (nonce_length <= 0 || plaintext_length < 0) { in NNA_GenerateAuthEF() 82 nonce_padding = get_padding_length(nonce_length); in NNA_GenerateAuthEF() 99 header->nonce_length = htons(nonce_length); in NNA_GenerateAuthEF() 103 ciphertext = body + nonce_length + nonce_padding; in NNA_GenerateAuthEF() 109 memcpy(body, nonce, nonce_length); in NNA_GenerateAuthEF() 110 memset(body + nonce_length, 0, nonce_padding); in NNA_GenerateAuthEF() 148 nonce_length = ntohs(header->nonce_length); in NNA_DecryptAuthEF() 151 if (get_padded_length(nonce_length) + in NNA_DecryptAuthEF() 156 ciphertext = nonce + get_padded_length(nonce_length); in NNA_DecryptAuthEF() [all …]
|
H A D | siv_nettle.c | 110 const unsigned char *nonce, int nonce_length, in SIV_Encrypt() argument 118 if (nonce_length < SIV_MIN_NONCE_SIZE || assoc_length < 0 || in SIV_Encrypt() 125 siv_cmac_aes128_encrypt_message(&instance->siv, nonce_length, nonce, in SIV_Encrypt() 135 const unsigned char *nonce, int nonce_length, in SIV_Decrypt() argument 143 if (nonce_length < SIV_MIN_NONCE_SIZE || assoc_length < 0 || in SIV_Decrypt() 150 if (!siv_cmac_aes128_decrypt_message(&instance->siv, nonce_length, nonce, in SIV_Decrypt()
|
/dports/net/chrony/chrony-4.2/ |
H A D | nts_ntp_auth.c | 40 uint16_t nonce_length; member 75 if (nonce_length <= 0 || plaintext_length < 0) { in NNA_GenerateAuthEF() 82 nonce_padding = get_padding_length(nonce_length); in NNA_GenerateAuthEF() 99 header->nonce_length = htons(nonce_length); in NNA_GenerateAuthEF() 103 ciphertext = body + nonce_length + nonce_padding; in NNA_GenerateAuthEF() 109 memcpy(body, nonce, nonce_length); in NNA_GenerateAuthEF() 110 memset(body + nonce_length, 0, nonce_padding); in NNA_GenerateAuthEF() 148 nonce_length = ntohs(header->nonce_length); in NNA_DecryptAuthEF() 151 if (get_padded_length(nonce_length) + in NNA_DecryptAuthEF() 156 ciphertext = nonce + get_padded_length(nonce_length); in NNA_DecryptAuthEF() [all …]
|
H A D | siv_nettle.c | 110 const unsigned char *nonce, int nonce_length, in SIV_Encrypt() argument 118 if (nonce_length < SIV_MIN_NONCE_SIZE || assoc_length < 0 || in SIV_Encrypt() 125 siv_cmac_aes128_encrypt_message(&instance->siv, nonce_length, nonce, in SIV_Encrypt() 135 const unsigned char *nonce, int nonce_length, in SIV_Decrypt() argument 143 if (nonce_length < SIV_MIN_NONCE_SIZE || assoc_length < 0 || in SIV_Decrypt() 150 if (!siv_cmac_aes128_decrypt_message(&instance->siv, nonce_length, nonce, in SIV_Decrypt()
|
/dports/security/nettle/nettle-3.7.3/ |
H A D | umac32.c | 53 ctx->nonce_length = sizeof(ctx->nonce); in umac32_set_key() 61 size_t nonce_length, const uint8_t *nonce) in umac32_set_nonce() argument 63 assert (nonce_length > 0); in umac32_set_nonce() 64 assert (nonce_length <= AES_BLOCK_SIZE); in umac32_set_nonce() 66 memcpy (ctx->nonce, nonce, nonce_length); in umac32_set_nonce() 67 memset (ctx->nonce + nonce_length, 0, AES_BLOCK_SIZE - nonce_length); in umac32_set_nonce() 69 ctx->nonce_low = ctx->nonce[nonce_length - 1] & 3; in umac32_set_nonce() 70 ctx->nonce[nonce_length - 1] &= ~3; in umac32_set_nonce() 71 ctx->nonce_length = nonce_length; in umac32_set_nonce() 123 unsigned i = ctx->nonce_length - 1; in umac32_digest()
|
H A D | umac64.c | 53 ctx->nonce_length = sizeof(ctx->nonce); in umac64_set_key() 61 size_t nonce_length, const uint8_t *nonce) in umac64_set_nonce() argument 63 assert (nonce_length > 0); in umac64_set_nonce() 64 assert (nonce_length <= AES_BLOCK_SIZE); in umac64_set_nonce() 66 memcpy (ctx->nonce, nonce, nonce_length); in umac64_set_nonce() 67 memset (ctx->nonce + nonce_length, 0, AES_BLOCK_SIZE - nonce_length); in umac64_set_nonce() 69 ctx->nonce_low = ctx->nonce[nonce_length - 1] & 1; in umac64_set_nonce() 70 ctx->nonce[nonce_length - 1] &= ~1; in umac64_set_nonce() 71 ctx->nonce_length = nonce_length; in umac64_set_nonce() 125 unsigned i = ctx->nonce_length - 1; in umac64_digest()
|
H A D | umac96.c | 52 ctx->nonce_length = sizeof(ctx->nonce); in umac96_set_key() 60 size_t nonce_length, const uint8_t *nonce) in umac96_set_nonce() argument 62 assert (nonce_length > 0); in umac96_set_nonce() 63 assert (nonce_length <= AES_BLOCK_SIZE); in umac96_set_nonce() 65 memcpy (ctx->nonce, nonce, nonce_length); in umac96_set_nonce() 66 memset (ctx->nonce + nonce_length, 0, AES_BLOCK_SIZE - nonce_length); in umac96_set_nonce() 68 ctx->nonce_length = nonce_length; in umac96_set_nonce() 116 INCREMENT (ctx->nonce_length, ctx->nonce); in umac96_digest()
|
H A D | umac128.c | 52 ctx->nonce_length = sizeof(ctx->nonce); in umac128_set_key() 60 size_t nonce_length, const uint8_t *nonce) in umac128_set_nonce() argument 62 assert (nonce_length > 0); in umac128_set_nonce() 63 assert (nonce_length <= AES_BLOCK_SIZE); in umac128_set_nonce() 65 memcpy (ctx->nonce, nonce, nonce_length); in umac128_set_nonce() 66 memset (ctx->nonce + nonce_length, 0, AES_BLOCK_SIZE - nonce_length); in umac128_set_nonce() 68 ctx->nonce_length = nonce_length; in umac128_set_nonce() 118 INCREMENT (ctx->nonce_length, ctx->nonce); in umac128_digest()
|
/dports/security/sequoia/sequoia-383133f6be990237044900a4df676488bf8dd71e/cargo-crates/nettle-src-3.5.1-2/nettle/ |
H A D | umac32.c | 53 ctx->nonce_length = sizeof(ctx->nonce); in umac32_set_key() 61 size_t nonce_length, const uint8_t *nonce) in umac32_set_nonce() argument 63 assert (nonce_length > 0); in umac32_set_nonce() 64 assert (nonce_length <= AES_BLOCK_SIZE); in umac32_set_nonce() 66 memcpy (ctx->nonce, nonce, nonce_length); in umac32_set_nonce() 67 memset (ctx->nonce + nonce_length, 0, AES_BLOCK_SIZE - nonce_length); in umac32_set_nonce() 69 ctx->nonce_low = ctx->nonce[nonce_length - 1] & 3; in umac32_set_nonce() 70 ctx->nonce[nonce_length - 1] &= ~3; in umac32_set_nonce() 71 ctx->nonce_length = nonce_length; in umac32_set_nonce() 123 unsigned i = ctx->nonce_length - 1; in umac32_digest()
|
H A D | umac64.c | 53 ctx->nonce_length = sizeof(ctx->nonce); in umac64_set_key() 61 size_t nonce_length, const uint8_t *nonce) in umac64_set_nonce() argument 63 assert (nonce_length > 0); in umac64_set_nonce() 64 assert (nonce_length <= AES_BLOCK_SIZE); in umac64_set_nonce() 66 memcpy (ctx->nonce, nonce, nonce_length); in umac64_set_nonce() 67 memset (ctx->nonce + nonce_length, 0, AES_BLOCK_SIZE - nonce_length); in umac64_set_nonce() 69 ctx->nonce_low = ctx->nonce[nonce_length - 1] & 1; in umac64_set_nonce() 70 ctx->nonce[nonce_length - 1] &= ~1; in umac64_set_nonce() 71 ctx->nonce_length = nonce_length; in umac64_set_nonce() 125 unsigned i = ctx->nonce_length - 1; in umac64_digest()
|
H A D | umac96.c | 52 ctx->nonce_length = sizeof(ctx->nonce); in umac96_set_key() 60 size_t nonce_length, const uint8_t *nonce) in umac96_set_nonce() argument 62 assert (nonce_length > 0); in umac96_set_nonce() 63 assert (nonce_length <= AES_BLOCK_SIZE); in umac96_set_nonce() 65 memcpy (ctx->nonce, nonce, nonce_length); in umac96_set_nonce() 66 memset (ctx->nonce + nonce_length, 0, AES_BLOCK_SIZE - nonce_length); in umac96_set_nonce() 68 ctx->nonce_length = nonce_length; in umac96_set_nonce() 116 INCREMENT (ctx->nonce_length, ctx->nonce); in umac96_digest()
|
H A D | umac128.c | 52 ctx->nonce_length = sizeof(ctx->nonce); in umac128_set_key() 60 size_t nonce_length, const uint8_t *nonce) in umac128_set_nonce() argument 62 assert (nonce_length > 0); in umac128_set_nonce() 63 assert (nonce_length <= AES_BLOCK_SIZE); in umac128_set_nonce() 65 memcpy (ctx->nonce, nonce, nonce_length); in umac128_set_nonce() 66 memset (ctx->nonce + nonce_length, 0, AES_BLOCK_SIZE - nonce_length); in umac128_set_nonce() 68 ctx->nonce_length = nonce_length; in umac128_set_nonce() 118 INCREMENT (ctx->nonce_length, ctx->nonce); in umac128_digest()
|
/dports/lang/zig-devel/zig-0.9.0/lib/std/crypto/ |
H A D | aes_gcm.zig | 18 pub const nonce_length = 12; 33 mem.copy(u8, j[0..nonce_length], npub[0..]); 34 mem.writeIntBig(u32, j[nonce_length..][0..4], 1); 41 mem.writeIntBig(u32, j[nonce_length..][0..4], 2); 65 mem.copy(u8, j[0..nonce_length], npub[0..]); 66 mem.writeIntBig(u32, j[nonce_length..][0..4], 1); 95 mem.writeIntBig(u32, j[nonce_length..][0..4], 2); 106 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; 118 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; 130 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; [all …]
|
/dports/lang/zig/zig-0.9.0/lib/std/crypto/ |
H A D | aes_gcm.zig | 18 pub const nonce_length = 12; 33 mem.copy(u8, j[0..nonce_length], npub[0..]); 34 mem.writeIntBig(u32, j[nonce_length..][0..4], 1); 41 mem.writeIntBig(u32, j[nonce_length..][0..4], 2); 65 mem.copy(u8, j[0..nonce_length], npub[0..]); 66 mem.writeIntBig(u32, j[nonce_length..][0..4], 1); 95 mem.writeIntBig(u32, j[nonce_length..][0..4], 2); 106 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; 118 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; 130 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; [all …]
|
/dports/net/chrony/chrony-4.2/test/unit/ |
H A D | siv.c | 34 int nonce_length; member 142 assert(tests[i].nonce_length <= sizeof (tests[i].nonce)); in test_unit() 152 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 157 r = SIV_Decrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 170 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 186 for (j = -1; j < tests[i].nonce_length; j++) { in test_unit() 200 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 213 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 228 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 245 r = SIV_Decrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() [all …]
|
H A D | nts_ntp_auth.c | 38 int i, j, r, packet_length, nonce_length, key_length; in test_unit() local 50 nonce_length = random() % sizeof (nonce) + 1; in test_unit() 51 for (j = 0; j < nonce_length; j++) in test_unit() 68 packet_length, nonce_length, plaintext_length, min_ef_length); in test_unit() 70 r = NNA_GenerateAuthEF(&packet, &info, siv, nonce, nonce_length, plaintext, in test_unit() 76 r = NNA_GenerateAuthEF(&packet, &info, siv, nonce, nonce_length, plaintext, in test_unit() 80 r = NNA_GenerateAuthEF(&packet, &info, siv, nonce, nonce_length, plaintext, in test_unit() 96 nonce_length + SIV_GetTagLength(siv) + 8) / 4 * 4; in test_unit()
|
/dports/net/chrony-lite/chrony-4.2/test/unit/ |
H A D | siv.c | 34 int nonce_length; member 142 assert(tests[i].nonce_length <= sizeof (tests[i].nonce)); in test_unit() 152 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 157 r = SIV_Decrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 170 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 186 for (j = -1; j < tests[i].nonce_length; j++) { in test_unit() 200 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 213 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 228 r = SIV_Encrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() 245 r = SIV_Decrypt(siv, tests[i].nonce, tests[i].nonce_length, in test_unit() [all …]
|
H A D | nts_ntp_auth.c | 38 int i, j, r, packet_length, nonce_length, key_length; in test_unit() local 50 nonce_length = random() % sizeof (nonce) + 1; in test_unit() 51 for (j = 0; j < nonce_length; j++) in test_unit() 68 packet_length, nonce_length, plaintext_length, min_ef_length); in test_unit() 70 r = NNA_GenerateAuthEF(&packet, &info, siv, nonce, nonce_length, plaintext, in test_unit() 76 r = NNA_GenerateAuthEF(&packet, &info, siv, nonce, nonce_length, plaintext, in test_unit() 80 r = NNA_GenerateAuthEF(&packet, &info, siv, nonce, nonce_length, plaintext, in test_unit() 96 nonce_length + SIV_GetTagLength(siv) + 8) / 4 * 4; in test_unit()
|
/dports/devel/grpc130/grpc-1.30.2/test/core/tsi/alts/crypt/ |
H A D | aes_gcm_test.cc | 39 size_t nonce_length; member 84 size_t nonce_length, tag_length; in gsec_test_random_encrypt_decrypt() local 89 gsec_test_random_array(&nonce, nonce_length); in gsec_test_random_encrypt_decrypt() 132 if (nonce_length > 0) { in gsec_test_random_encrypt_decrypt() 228 size_t nonce_length, tag_length; in gsec_test_multiple_random_encrypt_decrypt() local 412 size_t nonce_length; in gsec_test_encryption_failure() local 418 gsec_test_random_array(&nonce, nonce_length); in gsec_test_encryption_failure() 538 size_t nonce_length, tag_length; in gsec_test_decryption_failure() local 543 gsec_test_random_array(&nonce, nonce_length); in gsec_test_decryption_failure() 730 size_t nonce_length = test_vector->nonce_length; in gsec_test_get_crypter_from_test_vector() local [all …]
|
/dports/devel/grpc/grpc-1.42.0/test/core/tsi/alts/crypt/ |
H A D | aes_gcm_test.cc | 39 size_t nonce_length; member 84 size_t nonce_length, tag_length; in gsec_test_random_encrypt_decrypt() local 89 gsec_test_random_array(&nonce, nonce_length); in gsec_test_random_encrypt_decrypt() 134 if (nonce_length > 0) { in gsec_test_random_encrypt_decrypt() 238 size_t nonce_length, tag_length; in gsec_test_multiple_random_encrypt_decrypt() local 426 size_t nonce_length; in gsec_test_encryption_failure() local 432 gsec_test_random_array(&nonce, nonce_length); in gsec_test_encryption_failure() 552 size_t nonce_length, tag_length; in gsec_test_decryption_failure() local 557 gsec_test_random_array(&nonce, nonce_length); in gsec_test_decryption_failure() 746 size_t nonce_length = test_vector->nonce_length; in gsec_test_get_crypter_from_test_vector() local [all …]
|
/dports/devel/grpc134/grpc-1.34.1/test/core/tsi/alts/crypt/ |
H A D | aes_gcm_test.cc | 39 size_t nonce_length; member 84 size_t nonce_length, tag_length; in gsec_test_random_encrypt_decrypt() local 89 gsec_test_random_array(&nonce, nonce_length); in gsec_test_random_encrypt_decrypt() 132 if (nonce_length > 0) { in gsec_test_random_encrypt_decrypt() 228 size_t nonce_length, tag_length; in gsec_test_multiple_random_encrypt_decrypt() local 412 size_t nonce_length; in gsec_test_encryption_failure() local 418 gsec_test_random_array(&nonce, nonce_length); in gsec_test_encryption_failure() 538 size_t nonce_length, tag_length; in gsec_test_decryption_failure() local 543 gsec_test_random_array(&nonce, nonce_length); in gsec_test_decryption_failure() 730 size_t nonce_length = test_vector->nonce_length; in gsec_test_get_crypter_from_test_vector() local [all …]
|
/dports/www/chromium-legacy/chromium-88.0.4324.182/third_party/grpc/src/test/core/tsi/alts/crypt/ |
H A D | aes_gcm_test.cc | 38 size_t nonce_length; member 83 size_t nonce_length, tag_length; in gsec_test_random_encrypt_decrypt() local 88 gsec_test_random_array(&nonce, nonce_length); in gsec_test_random_encrypt_decrypt() 131 if (nonce_length > 0) { in gsec_test_random_encrypt_decrypt() 227 size_t nonce_length, tag_length; in gsec_test_multiple_random_encrypt_decrypt() local 411 size_t nonce_length; in gsec_test_encryption_failure() local 417 gsec_test_random_array(&nonce, nonce_length); in gsec_test_encryption_failure() 537 size_t nonce_length, tag_length; in gsec_test_decryption_failure() local 542 gsec_test_random_array(&nonce, nonce_length); in gsec_test_decryption_failure() 729 size_t nonce_length = test_vector->nonce_length; in gsec_test_get_crypter_from_test_vector() local [all …]
|
/dports/devel/grpc/grpc-1.42.0/src/core/tsi/alts/crypt/ |
H A D | gsec.h | 148 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 154 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 165 grpc_status_code (*nonce_length)(const gsec_aead_crypter* crypter, member 216 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 249 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 287 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 317 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 454 size_t nonce_length,
|
/dports/devel/grpc130/grpc-1.30.2/src/core/tsi/alts/crypt/ |
H A D | gsec.h | 143 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 149 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 160 grpc_status_code (*nonce_length)(const gsec_aead_crypter* crypter, member 211 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 244 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 282 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 312 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 449 size_t nonce_length,
|
/dports/devel/grpc134/grpc-1.34.1/src/core/tsi/alts/crypt/ |
H A D | gsec.h | 143 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 149 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 160 grpc_status_code (*nonce_length)(const gsec_aead_crypter* crypter, member 211 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 244 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 282 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 312 gsec_aead_crypter* crypter, const uint8_t* nonce, size_t nonce_length, 449 size_t nonce_length,
|