blob: 4b2ac694c79ddd0860422149463a32b6df59ffd8 [file] [log] [blame]
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cryptohome/auth_block.h"
namespace cryptohome {
class LibScryptCompatAuthBlock : public AuthBlock {
LibScryptCompatAuthBlock() = default;
~LibScryptCompatAuthBlock() = default;
// Derives a high entropy secret from the user's password with scrypt.
// Returns a key for each field that must be wrapped by scrypt, such as the
// wrapped_chaps_key, etc.
base::Optional<AuthBlockState> Create(const AuthInput& user_input,
KeyBlobs* key_blobs,
CryptoError* error) override;
// This uses Scrypt to derive high entropy keys from the user's password.
bool Derive(const AuthInput& auth_input,
const AuthBlockState& state,
KeyBlobs* key_blobs,
CryptoError* error) override;
} // namespace cryptohome