/crypto/x509/ |
A D | x509name.cc | 157 int type, const unsigned char *bytes, in X509_NAME_add_entry_by_OBJ() argument 160 X509_NAME_ENTRY_create_by_OBJ(NULL, obj, type, bytes, len); in X509_NAME_add_entry_by_OBJ() 173 X509_NAME_ENTRY_create_by_NID(NULL, nid, type, bytes, len); in X509_NAME_add_entry_by_NID() 186 X509_NAME_ENTRY_create_by_txt(NULL, field, type, bytes, len); in X509_NAME_add_entry_by_txt() 271 nentry = X509_NAME_ENTRY_create_by_OBJ(ne, obj, type, bytes, len); in X509_NAME_ENTRY_create_by_txt() 285 return X509_NAME_ENTRY_create_by_OBJ(ne, obj, type, bytes, len); in X509_NAME_ENTRY_create_by_NID() 305 if (!X509_NAME_ENTRY_set_data(ret, type, bytes, len)) { in X509_NAME_ENTRY_create_by_OBJ() 332 if ((ne == NULL) || ((bytes == NULL) && (len != 0))) { in X509_NAME_ENTRY_set_data() 336 return ASN1_STRING_set_by_NID(&ne->value, bytes, len, type, in X509_NAME_ENTRY_set_data() 342 len = strlen((const char *)bytes); in X509_NAME_ENTRY_set_data() [all …]
|
A D | x_name.cc | 103 if ((ret->bytes = BUF_MEM_new()) == NULL) { in IMPLEMENT_EXTERN_ASN1() 129 BUF_MEM_free(a->bytes); in x509_name_ex_free() 181 if (!BUF_MEM_grow(nm->bytes, p - q)) { in x509_name_ex_d2i() 184 OPENSSL_memcpy(nm->bytes->data, q, p - q); in x509_name_ex_d2i() 221 int ret = a->bytes->length; in x509_name_ex_i2d() 223 OPENSSL_memcpy(*out, a->bytes->data, ret); in x509_name_ex_i2d() 267 if (!BUF_MEM_grow(a->bytes, len)) { in x509_name_encode() 270 p = (unsigned char *)a->bytes->data; in x509_name_encode() 486 *out_der = (unsigned char *)nm->bytes->data; in X509_NAME_get0_der() 489 *out_der_len = nm->bytes->length; in X509_NAME_get0_der()
|
A D | x509_att.cc | 71 const unsigned char *bytes, in X509_ATTRIBUTE_create_by_txt() argument 82 nattr = X509_ATTRIBUTE_create_by_OBJ(attr, obj, type, bytes, len); in X509_ATTRIBUTE_create_by_txt()
|
/crypto/pem/ |
A D | pem_test.cc | 144 std::vector<uint8_t> bytes = DecodePEMBytes(kEncryptedPEM); in TEST() local 145 ASSERT_FALSE(bytes.empty()); in TEST() 147 bssl::UniquePtr<BIO> bio(BIO_new_mem_buf(bytes.data(), bytes.size())); in TEST() 155 bssl::UniquePtr<BIO> bio(BIO_new_mem_buf(bytes.data(), bytes.size())); in TEST() 167 bssl::UniquePtr<BIO> bio(BIO_new_mem_buf(bytes.data(), bytes.size())); in TEST() 216 bytes = DecodePEMBytes(kEncryptedPEMEmpty); in TEST() 218 ASSERT_FALSE(bytes.empty()); in TEST() 219 bssl::UniquePtr<BIO> bio(BIO_new_mem_buf(bytes.data(), bytes.size())); in TEST()
|
/crypto/fipsmodule/bn/ |
A D | bytes.cc.inc | 106 // Make sure the top bytes will be zeroed. 120 // represented in |num_bytes| bytes. 123 const uint8_t *bytes = (const uint8_t *)words; 127 mask |= bytes[i]; 133 const uint8_t *bytes = (const uint8_t *)bn->d; 138 assert(bytes[i] == 0); 140 (void)bytes; 151 const uint8_t *bytes = (const uint8_t *)in; 158 out[out_len - i - 1] = bytes[i]; 177 const uint8_t *bytes = (const uint8_t *)in->d; [all …]
|
A D | bn_test.cc | 1058 for (size_t bytes = 128 - 7; bytes <= 128; bytes++) { in TEST_F() local 1061 ASSERT_EQ(bytes, BN_num_bytes(n.get())); in TEST_F() 1062 ASSERT_EQ(bytes, BN_bn2bin(n.get(), reference)); in TEST_F() 1072 EXPECT_EQ(Bytes(reference, bytes), Bytes(out, bytes)); in TEST_F() 1077 EXPECT_EQ(Bytes(reference, bytes), Bytes(out + 1, bytes)); in TEST_F() 1081 EXPECT_EQ(Bytes(zeros, sizeof(out) - bytes), in TEST_F() 1082 Bytes(out, sizeof(out) - bytes)); in TEST_F() 1083 EXPECT_EQ(Bytes(reference, bytes), Bytes(out + sizeof(out) - bytes, bytes)); in TEST_F() 1092 EXPECT_EQ(Bytes(reference, bytes), Bytes(out + 1, bytes)); in TEST_F() 1114 for (size_t bytes = 128 - 7; bytes <= 128; bytes++) { in TEST_F() local [all …]
|
/crypto/bytestring/ |
A D | cbs.cc | 479 CBS bytes; in CBS_get_asn1_uint64_with_tag() local 480 if (!CBS_get_asn1(cbs, &bytes, tag) || in CBS_get_asn1_uint64_with_tag() 486 const uint8_t *data = CBS_data(&bytes); in CBS_get_asn1_uint64_with_tag() 487 size_t len = CBS_len(&bytes); in CBS_get_asn1_uint64_with_tag() 506 CBS bytes; in CBS_get_asn1_int64_with_tag() local 507 if (!CBS_get_asn1(cbs, &bytes, tag) || in CBS_get_asn1_int64_with_tag() 511 const uint8_t *data = CBS_data(&bytes); in CBS_get_asn1_int64_with_tag() 512 const size_t len = CBS_len(&bytes); in CBS_get_asn1_int64_with_tag() 524 CBS bytes; in CBS_get_asn1_bool() local 525 if (!CBS_get_asn1(cbs, &bytes, CBS_ASN1_BOOLEAN) || CBS_len(&bytes) != 1) { in CBS_get_asn1_bool() [all …]
|
A D | cbb.cc | 555 uint8_t bytes[sizeof(int64_t)]; in CBB_add_asn1_int64_with_tag() local 556 memcpy(bytes, &value, sizeof(value)); in CBB_add_asn1_int64_with_tag() 559 while (start > 0 && (bytes[start] == 0xff && (bytes[start - 1] & 0x80))) { in CBB_add_asn1_int64_with_tag() 568 if (!CBB_add_u8(&child, bytes[i])) { in CBB_add_asn1_int64_with_tag()
|
/crypto/fipsmodule/ec/ |
A D | felem.cc.inc | 32 uint8_t bytes[EC_MAX_BYTES]; 34 assert(sizeof(bytes) >= len); 36 !BN_bn2bin_padded(bytes, len, in)) { 41 return ec_felem_from_bytes(group, out, bytes, len); 45 uint8_t bytes[EC_MAX_BYTES]; 47 ec_felem_to_bytes(group, bytes, &len, in); 48 return BN_bin2bn(bytes, len, out) != NULL;
|
A D | make_tables.go | 392 bytes := n.Bytes() 393 for i, b := range bytes { 394 i = len(bytes) - i - 1 403 bytes := n.Bytes() 404 for i, b := range bytes { 405 i = len(bytes) - i - 1 420 idx := bytes.LastIndexByte(p[:n], '\n')
|
/crypto/fipsmodule/ |
A D | bcm_interface.h | 277 uint8_t bytes[32 + 32 + 64 + 256 * 4 * (5 + 6 + 6)]; member 284 uint8_t bytes[32 + 64 + 256 * 4 * 6]; member 291 uint8_t bytes[200 + 4 + 4 + 4 * sizeof(size_t)]; member 419 uint8_t bytes[32 + 64 + 256 * 4 * 8]; member 426 uint8_t bytes[200 + 4 + 4 + 4 * sizeof(size_t)]; member 553 uint8_t bytes[32 + 64 + 256 * 4 * 4]; member 560 uint8_t bytes[200 + 4 + 4 + 4 * sizeof(size_t)]; member 710 uint8_t bytes[512 * (3 + 9) + 32 + 32]; member 717 uint8_t bytes[512 * (3 + 3 + 9) + 32 + 32 + 32]; member 799 uint8_t bytes[512 * (4 + 16) + 32 + 32]; member [all …]
|
/crypto/fipsmodule/rand/ |
A D | rand.cc.inc | 52 // CRNGT_BLOCK_SIZE is the number of bytes in a “block” for the purposes of the 189 // bytes contains entropy suitable for seeding a DRBG. 191 // bytes_valid indicates the number of bytes of |bytes| that contain valid 194 // want_additional_input is true if any of the contents of |bytes| were 208 const size_t space = sizeof(buffer->bytes) - buffer->bytes_valid; 220 // get_seed_entropy fills |out_entropy_len| bytes of |out_entropy| from the 225 if (out_entropy_len > sizeof(buffer->bytes)) { 237 OPENSSL_memcpy(out_entropy, buffer->bytes, out_entropy_len); 238 OPENSSL_memmove(buffer->bytes, &buffer->bytes[out_entropy_len], 250 // |*out_additional_input_len| to the number of extra bytes. [all …]
|
/crypto/poly1305/ |
A D | poly1305_vec.cc | 250 while (bytes >= 64) { in poly1305_blocks() 412 bytes -= 64; in poly1305_blocks() 449 if (bytes >= 32) { in poly1305_combine() 672 if (bytes == 0) { in CRYPTO_poly1305_update() 681 bytes -= 32; in CRYPTO_poly1305_update() 685 bytes -= want; in CRYPTO_poly1305_update() 701 bytes -= want; in CRYPTO_poly1305_update() 712 if (bytes >= 64) { in CRYPTO_poly1305_update() 713 want = (bytes & ~63); in CRYPTO_poly1305_update() 716 bytes -= want; in CRYPTO_poly1305_update() [all …]
|
/crypto/fipsmodule/ecdsa/ |
A D | ecdsa_test.cc | 275 std::vector<uint8_t> bytes(order_len, 0xff); in TEST() local 276 ASSERT_TRUE(BN_bin2bn(bytes.data(), bytes.size(), sig->r)); in TEST() 277 ASSERT_TRUE(BN_bin2bn(bytes.data(), bytes.size(), sig->s)); in TEST() 341 std::vector<uint8_t> bytes; in GetBIGNUM() local 342 if (!t->GetBytes(&bytes, key)) { in GetBIGNUM() 346 return bssl::UniquePtr<BIGNUM>(BN_bin2bn(bytes.data(), bytes.size(), nullptr)); in GetBIGNUM()
|
/crypto/des/ |
A D | des.cc | 340 DES_set_key_ex(key->bytes, schedule); in DES_set_key() 424 key->bytes[i] = kOddParity[key->bytes[i]]; in DES_set_odd_parity() 591 DES_ecb_encrypt_ex(in_block->bytes, out_block->bytes, schedule, is_encrypt); in DES_ecb_encrypt() 607 DES_ncbc_encrypt_ex(in, out, len, schedule, ivec->bytes, enc); in DES_ncbc_encrypt() 689 DES_ecb3_encrypt_ex(input->bytes, output->bytes, ks1, ks2, ks3, enc); in DES_ecb3_encrypt() 713 DES_ede3_cbc_encrypt_ex(in, out, len, ks1, ks2, ks3, ivec->bytes, enc); in DES_ede3_cbc_encrypt()
|
/crypto/cipher/ |
A D | e_aesctrhmac.cc | 112 uint8_t bytes[8]; in hmac_update_uint64() local 114 for (i = 0; i < sizeof(bytes); i++) { in hmac_update_uint64() 115 bytes[i] = value & 0xff; in hmac_update_uint64() 118 SHA256_Update(sha256, bytes, sizeof(bytes)); in hmac_update_uint64()
|
/crypto/cipher/test/ |
A D | aes_128_gcm_tests.txt | 477 # 128 bytes AD 485 # 48 bytes plaintext 493 # 80 bytes plaintext 501 # 128 bytes plaintext 509 # 192 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF 517 # 288 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF 525 # 80 bytes plaintext, submitted by Intel
|
A D | cipher_tests.txt | 510 # 128 bytes aad 519 # 48 bytes plaintext 528 # 80 bytes plaintext 537 # 128 bytes plaintext 546 # 192 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF 555 # 288 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF 564 # 80 bytes plaintext, submitted by Intel
|
/crypto/rand/ |
A D | urandom_test.cc | 338 uint8_t bytes[8]; in memcpy_to_remote() local 340 bytes, ptrace(PTRACE_PEEKDATA, child_pid, in memcpy_to_remote() 342 memcpy(&bytes[offset], src, todo); in memcpy_to_remote() 343 word = CRYPTO_load_u64_le(bytes); in memcpy_to_remote() 368 uint8_t bytes[8]; in get_byte_from_remote() local 369 CRYPTO_store_u64_le(bytes, word); in get_byte_from_remote() 370 return bytes[offset]; in get_byte_from_remote()
|
/crypto/ecdh/ |
A D | ecdh_test.cc | 62 std::vector<uint8_t> bytes; in GetBIGNUM() local 63 if (!t->GetBytes(&bytes, key)) { in GetBIGNUM() 67 return bssl::UniquePtr<BIGNUM>(BN_bin2bn(bytes.data(), bytes.size(), nullptr)); in GetBIGNUM()
|
/crypto/bn/ |
A D | convert.cc | 315 const size_t bytes = (bits + 7) / 8; in BN_bn2mpi() local 319 if (bytes != 0 && (bits & 0x07) == 0) { in BN_bn2mpi() 323 const size_t len = bytes + extend; in BN_bn2mpi() 324 if (len < bytes || 4 + len < len || (len & 0xffffffff) != len) { in BN_bn2mpi()
|
/crypto/kyber/ |
A D | internal.h | 36 uint8_t bytes[512 * (3 + 9) + 32 + 32]; member 45 uint8_t bytes[512 * (3 + 3 + 9) + 32 + 32 + 32]; member
|
/crypto/obj/ |
A D | objects.go | 378 var b bytes.Buffer 390 var b bytes.Buffer 488 var b bytes.Buffer 609 return bytes.Compare(a.encoded, b.encoded) < 0
|
/crypto/spake2plus/ |
A D | spake2plus.cc | 94 bool AddLengthPrefixed(CBB *cbb, Span<const uint8_t> bytes) { in AddLengthPrefixed() argument 95 return CBB_add_u64le(cbb, bytes.size()) && in AddLengthPrefixed() 96 CBB_add_bytes(cbb, bytes.data(), bytes.size()); in AddLengthPrefixed()
|
/crypto/ |
A D | compiler_test.cc | 215 uint8_t bytes[sizeof(null)] = {0}; in TEST() local 216 EXPECT_EQ(Bytes(bytes), in TEST()
|