Searched defs:secret (Results 1 - 10 of 10) sorted by relevance

/system/vold/
H A DKeyStorage.h29 // If "token" and "secret" are nonempty, "secret" is appended to the application-specific
31 // If only "secret" is nonempty, it is used to decrypt in a non-Keymaster process.
34 KeyAuthentication(std::string t, std::string s) : token{t}, secret{s} {};
36 bool usesKeymaster() const { return !token.empty() || secret.empty(); };
39 const std::string secret; member in class:android::vold::KeyAuthentication
H A DKeyStorage.cpp281 } else if (auth.secret.empty()) {
295 static bool stretchSecret(const std::string& stretching, const std::string& secret, argument
298 if (!secret.empty()) {
304 *stretched = secret;
314 if (crypto_scrypt(reinterpret_cast<const uint8_t*>(secret.data()), secret.size(),
332 if (!stretchSecret(stretching, auth.secret, salt, &stretched)) return false;
H A DExt4Crypt.cpp556 std::string token, secret;
558 if (!parse_hex(secret_hex, &secret)) return false;
559 auto auth = secret.empty() ? kEmptyAuthentication
560 : android::vold::KeyAuthentication(token, secret);
599 std::string token, secret; local
601 if (!parse_hex(secret_hex, &secret)) return false;
602 android::vold::KeyAuthentication auth(token, secret);
H A DVoldNativeService.cpp711 const std::string& token, const std::string& secret) {
715 return translateBool(e4crypt_add_user_key_auth(userId, userSerial, token, secret));
726 const std::string& token, const std::string& secret) {
730 return translateBool(e4crypt_unlock_user_key(userId, userSerial, token, secret));
710 addUserKeyAuth(int32_t userId, int32_t userSerial, const std::string& token, const std::string& secret) argument
725 unlockUserKey(int32_t userId, int32_t userSerial, const std::string& token, const std::string& secret) argument
/system/keymaster/include/keymaster/km_openssl/
H A Dhkdf.h35 bool Init(Buffer& secret, Buffer& salt) { argument
36 return Init(secret.peek_read(), secret.available_read(), salt.peek_read(),
40 bool Init(const uint8_t* secret, size_t secret_len, const uint8_t* salt, size_t salt_len) { argument
41 return Kdf::Init(KM_DIGEST_SHA_2_256, secret, secret_len, salt, salt_len);
H A Diso18033kdf.h37 bool Init(keymaster_digest_t digest_type, const uint8_t* secret, size_t secret_len) { argument
38 return Kdf::Init(digest_type, secret, secret_len, nullptr /* salt */, 0 /* salt_len */);
43 * KDF takes a secret and outputs:
45 * hash(secret || start_counter) || hash(secret|| start_counter + 1) || ...
47 * In ANSI-X9-42, KDF takes a secret and additional info, and outputs:
49 * hash(secret || start_counter || info) || hash(secret || start_counter + 1 || info) || ...
/system/keymaster/km_openssl/
H A Dkdf.cpp23 bool Kdf::Init(keymaster_digest_t digest_type, const uint8_t* secret, size_t secret_len, argument
40 if (!secret || secret_len == 0)
44 secret_key_.reset(dup_buffer(secret, secret_len));
/system/netd/server/
H A DInterfaceController.cpp71 // Property used to persist RFC 7217 stable secret. Protected by SELinux policy.
74 // RFC 7217 stable secret on linux is formatted as an IPv6 address.
210 std::string secret = oldSecret; local
212 // Generate a new secret if no persistent property existed.
214 ASSIGN_OR_RETURN(secret, randomIPv6Address());
217 // Ask the OS to generate SLAAC addresses on iface using secret.
218 RETURN_IF_NOT_OK(sys.write(procFd.value(), makeSlice(secret)));
220 // Don't persist an existing secret.
225 return setProperty(kStableSecretProperty, secret);
/system/tpm/trunks/
H A Dtpm_generated.h1499 BYTE secret[sizeof(TPMU_ENCRYPTED_SECRET)]; member in struct:trunks::TPM2B_ENCRYPTED_SECRET
3627 const TPM2B_ENCRYPTED_SECRET& secret,
3639 const TPM2B_ENCRYPTED_SECRET& secret,
3648 const TPM2B_ENCRYPTED_SECRET& secret,
3653 const TPM2B_ENCRYPTED_SECRET& secret)>
3665 TPM2B_ENCRYPTED_SECRET* secret,
3679 TPM2B_ENCRYPTED_SECRET* secret,
H A Dtpm_generated.cc6695 if (arraysize(value.secret) < value.size) {
6699 result = Serialize_BYTE(value.secret[i], buffer);
6718 if (arraysize(value->secret) < value->size) {
6722 result = Parse_BYTE(buffer, &value->secret[i], value_bytes);
6732 CHECK(bytes.size() <= sizeof(tpm2b.secret));
6735 memcpy(tpm2b.secret, bytes.data(), bytes.size());
6741 const char* char_buffer = reinterpret_cast<const char*>(tpm2b.secret);
10640 const TPM2B_ENCRYPTED_SECRET& secret,
10673 rc = Serialize_TPM2B_ENCRYPTED_SECRET(secret, &secret_bytes);
10858 const TPM2B_ENCRYPTED_SECRET& secret,
10634 SerializeCommand_ActivateCredential( const TPMI_DH_OBJECT& activate_handle, const std::string& activate_handle_name, const TPMI_DH_OBJECT& key_handle, const std::string& key_handle_name, const TPM2B_ID_OBJECT& credential_blob, const TPM2B_ENCRYPTED_SECRET& secret, std::string* serialized_command, AuthorizationDelegate* authorization_delegate) argument
10853 ActivateCredential(const TPMI_DH_OBJECT& activate_handle, const std::string& activate_handle_name, const TPMI_DH_OBJECT& key_handle, const std::string& key_handle_name, const TPM2B_ID_OBJECT& credential_blob, const TPM2B_ENCRYPTED_SECRET& secret, AuthorizationDelegate* authorization_delegate, const ActivateCredentialResponse& callback) argument
10877 ActivateCredentialSync( const TPMI_DH_OBJECT& activate_handle, const std::string& activate_handle_name, const TPMI_DH_OBJECT& key_handle, const std::string& key_handle_name, const TPM2B_ID_OBJECT& credential_blob, const TPM2B_ENCRYPTED_SECRET& secret, TPM2B_DIGEST* cert_info, AuthorizationDelegate* authorization_delegate) argument
10998 ParseResponse_MakeCredential( const std::string& response, TPM2B_ID_OBJECT* credential_blob, TPM2B_ENCRYPTED_SECRET* secret, AuthorizationDelegate* authorization_delegate) argument
11105 TPM2B_ENCRYPTED_SECRET secret; local
11137 MakeCredentialSync(const TPMI_DH_OBJECT& handle, const std::string& handle_name, const TPM2B_DIGEST& credential, const TPM2B_NAME& object_name, TPM2B_ID_OBJECT* credential_blob, TPM2B_ENCRYPTED_SECRET* secret, AuthorizationDelegate* authorization_delegate) argument
[all...]

Completed in 2229 milliseconds