Home
last modified time | relevance | path

Searched refs:digest_len (Results 1 – 11 of 11) sorted by relevance

/system/keymaster/km_openssl/
Dhmac.cpp49 bool HmacSha256::Sign(const Buffer& data, uint8_t* out_digest, size_t digest_len) const { in Sign()
50 return Sign(data.peek_read(), data.available_read(), out_digest, digest_len); in Sign()
54 size_t digest_len) const { in Sign()
55 assert(digest_len); in Sign()
59 if (digest_len >= SHA256_DIGEST_LENGTH) digest = out_digest; in Sign()
64 if (digest_len < SHA256_DIGEST_LENGTH) memcpy(out_digest, tmp, digest_len); in Sign()
75 size_t digest_len) const { in Verify()
76 if (digest_len != SHA256_DIGEST_LENGTH) return false; in Verify()
Dhmac_operation.cpp177 unsigned int digest_len; in Finish() local
178 if (!HMAC_Final(&ctx_, digest, &digest_len)) return TranslateLastOpenSslError(); in Finish()
182 if (mac_length_ > digest_len) return KM_ERROR_UNSUPPORTED_MAC_LENGTH; in Finish()
188 if (siglen > digest_len || siglen < kMinHmacLengthBits / 8) in Finish()
Dsoft_keymaster_enforcement.cpp111 unsigned digest_len = SHA256_DIGEST_LENGTH; in hmacSha256() local
112 if (!output->Reset(digest_len)) return KM_ERROR_MEMORY_ALLOCATION_FAILED; in hmacSha256()
127 if (!HMAC_Final(ctx.get(), output->writable_data(), &digest_len)) { in hmacSha256()
131 if (digest_len != output->data_length) return KM_ERROR_UNKNOWN_ERROR; in hmacSha256()
/system/keymaster/include/keymaster/km_openssl/
Dhmac.h40 bool Sign(const Buffer& data, uint8_t* digest, size_t digest_len) const;
41 bool Sign(const uint8_t* data, size_t data_len, uint8_t* digest, size_t digest_len) const;
51 size_t digest_len) const;
/system/keymaster/legacy_support/
Dkeymaster1_engine.cpp320 int Keymaster1Engine::ecdsa_sign(const uint8_t* digest, size_t digest_len, uint8_t* sig, in ecdsa_sign() argument
327 if (digest_len > max_input_len) digest_len = max_input_len; in ecdsa_sign()
329 keymaster_blob_t input = {digest, digest_len}; in ecdsa_sign()
/system/keymint/boringssl/src/
Drsa.rs246 let digest_len = (kmr_common::tag::digest_len(digest)? / 8) as libc::c_int; in new() localVariable
248 cvt(ffi::EVP_PKEY_CTX_set_rsa_pss_saltlen(op.pctx.0, digest_len))?; in new()
/system/security/keystore-engine/
Dkeystore2_engine.cpp86 extern "C" int ecdsa_sign(const uint8_t* digest, size_t digest_len, uint8_t* sig,
301 extern "C" int ecdsa_sign(const uint8_t* digest, size_t digest_len, uint8_t* sig, in ecdsa_sign() argument
313 auto output = keystore2_sign(**key_backend, std::vector<uint8_t>(digest, digest + digest_len), in ecdsa_sign()
/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_engine.h107 static int ecdsa_sign(const uint8_t* digest, size_t digest_len, uint8_t* sig,
/system/core/fs_mgr/libfs_avb/
Dfs_avb_util.cpp130 hash_desc->digest = BytesToHex(desc_digest, hash_desc->digest_len); in GetHashDescriptor()
/system/keymint/common/src/
Dtag.rs1113 let d = digest_len(digest)?; in check_begin_rsa_params()
1290 if mac_len % 8 != 0 || mac_len > digest_len(digest)? { in check_begin_hmac_params()
1308 pub fn digest_len(digest: Digest) -> Result<u32, Error> { in digest_len() function
/system/keymint/ta/src/
Doperation.rs358 let max_tag_len = kmr_common::tag::digest_len(digest)? as usize; in begin_operation()