Phase 3a green: implement auth.unwrapAuth
The implementation is exactly the decryption chain documented in the test file: deriveKEK -> decryptBox(masterKey) -> decryptBox(secretKey) -> decryptSealed(token) -> toBase64URL. Errors from the underlying crypto primitives propagate; the only added validation is the up-front check that the response actually contains both keyAttributes and encryptedToken (caller bug if not). Also re-exports the auth/unwrap and auth/types public surface from src/index.ts. All 38 tests pass; make check and make docker are green.
This commit is contained in:
@@ -1 +1,9 @@
|
||||
export const VERSION = "0.0.0";
|
||||
|
||||
export { unwrapAuth, type UnwrapResult } from "./auth/unwrap.js";
|
||||
export type {
|
||||
AuthorizationResponse,
|
||||
KeyAttributes,
|
||||
LoginChallenge,
|
||||
SRPAttributes,
|
||||
} from "./auth/types.js";
|
||||
|
||||
Reference in New Issue
Block a user