Repository navigation
Significant changes since Multipaz 0.101.0 include:
- Biometric face matching and liveness (
multipaz-facenet): Introduced a cross-platform biometric verification framework (FaceMatcher,FaceMatcherSession,FaceMatcherLivenessSession, and full-screen interactive prompts in Compose Multiplatform and SwiftUI with screen brightness and background color control) along with the newmultipaz-facenetmodule implementing on-device face detection, 4-point Procrustes face alignment, MobileFaceNet embedding extraction, single-frame passive anti-spoofing (MiniFASNetV2), and configurable head-pose capture across Android, iOS, and JVM. Added end-to-end support for biometric face matching during ISO mdoc and OpenID4VP presentment according to ISO/IEC 23220-5 (CHV_1and portrait image equivalence) with relying-party-awareFaceMatchingModepolicies. - Post-quantum and RSA cryptography: Added support for ML-DSA (FIPS 204) digital signatures (
ML_DSA_44,ML_DSA_65,ML_DSA_87), ML-KEM (FIPS 203) key encapsulation (ML_KEM_512,ML_KEM_768,ML_KEM_1024), and RSA (RS256,RS384,RS512,PS256,PS384,PS512across 2048, 3072, and 4096-bit keys) acrossCrypto(JVM/Android, iOS, and Web Crypto),PublicKey/PrivateKey/Signatureabstractions, X.509 certificates, COSE/CWT, JWS, SD-JWT / SD-JWT+KB,SoftwareSecureArea,AndroidKeystoreSecureArea(including ML-DSA on Android 17 / KeyMint 5.0+),SecureEnclaveSecureArea(including ML-DSA and ML-KEM on iOS 26+),CloudSecureArea, and the Multipaz Web Developer Tools. - Key material memory zeroing and type safety: Introduced
SecureByteStringandSecretKey(AutoCloseable) with deterministic memory wiping (ByteArray.secureZero()), GC safety-net cleaners (KeyDisposer), constant-time equality, and private key duplication (PrivateKey.duplicate()). UpdatedPrivateKey,AsymmetricKey,SessionEncryption,Hkdf,Crypto, andSecureArea(keyAgreement()andkemDecapsulate()) to enforce type safety between input keying material and symmetric cipher keys and securely zero sensitive buffers upon disposal. - Cryptographically secure and testable randomness: Added
Crypto.secureRandombacked by platform CSPRNGs (SecureRandom,SecRandomCopyBytes, andcrypto.getRandomValues) and updated security-sensitive APIs across the SDK and servers to accept aRandomparameter defaulting toCrypto.secureRandom. - Cloud Secure Area CBOR-RPC rework: Replaced the custom Cloud Secure Area command protocol, E2EE session layer, and manual state serialization with Multipaz CBOR-based RPC (
@RpcInterfaceCloudSecureAreaProtocoland@RpcStateserver states) and device-assertion authentication (RpcAuthIssuerAssertionandRpcAuthClientSession). - Longfellow ZKP Rust migration and 16 KB page alignment: Switched
multipaz-longfellowfrom the legacy C++ JNI pipeline to an in-repo Rust cross-compilation pipeline (longfellow-zk) using JNA across JVM and Android, and updated JNA to 5.19.1 with 16 KB ELF segment alignment across all Android native libraries for Android 15+ compatibility. - Credential structure validation: Added comprehensive validation routines (
validate(),validateAgainstMso(), andvalidateVc()) and a structuredValidationResult/ValidationFindingDSL for inspecting ISO/IEC 18013-5 (IssuerSignedItem,IssuerNamespaces,MobileSecurityObject,MdocCredential) and RFC 9901 / SD-JWT VC (Disclosure,SdJwt,SdJwtVcCredential) payloads prior to certification. - Digital Credentials API module split and Credman enhancements: Split
multipaz-dcapiinto platform-specificmultipaz-dcapi-credman(Android) andmultipaz-dcapi-ios(iOS) modules with explicit instantiation. Added support inmultipaz-dcapi-credmanfor omitting claim values when registering credentials (Document.androidCredmanOmitClaims), matching OpenID4VP DCQL array claim paths (nullwildcards and integer indices), and encoding native Android app origins with URL-safe Base64. - KMP NFC APDU routing and mdoc services: Moved mdoc NFC engagement and data-transfer services (
NfcApduRouter,NfcApduService,MdocNdefService,MdocNfcV2Service, andMdocNfcDataTransferService) frommultipaz-compose(androidMain) tomultipaz(commonMain) with strongly-typedCommandApdu/ResponseApdurouting andNfcDeactivationReason. - Google Android Key Attestation verifier on JVM: Delegated
validateAndroidKeyAttestation()on JVM (jvmMain, targeting Java 21 while keeping Android targets at Java 17) to Google'scom.android.keyattestation:keyattestationlibrary with certificate revocation checking support. - Secure-by-default API and configuration parameters: Audited and hardened default parameter values and server configuration fallbacks across device/key attestation, credential validation (
now = Clock.System.now()),SdJwt.verify()/SdJwtKb.verify(), and Cloud Secure Area settings. - iOS Secure Enclave key invalidation and unlock reasons: Added biometric domain-state tracking in
SecureEnclaveSecureAreato detect key invalidation (getKeyInvalidated()andKeyInvalidatedException) forBIOMETRY_CURRENT_SETkeys, and automatic localized unlock reason conversion viaPromptModelinSecureEnclaveDefaultKeyUnlockDataProvider. - Doctype updates (EU PID and Aadhaar): Aligned
EUPersonalIDwith the EUDI PID Rulebook v1.7 (structuredplace_of_birth, JSON-onlyhouse_number, updated age and portrait equivalence requests) and alignedAadhaarattribute identifiers and request selectors with Google Wallet. - BLE, NFC, and presentment reliability fixes: Fixed NFC engagement and BLE session cleanup on repeated taps, closed NFC tags on reader transport failure so the iOS system scan sheet dismisses promptly, fixed an iOS BLE peripheral stall when sending large responses off the main thread, failed BLE peripheral transports immediately upon central disconnection, retried Android BLE service discovery after connection, and rejected duplicate transports in
waitForConnection(). - Protocol and cryptographic bug fixes: Fixed empty CRL parsing and generation per RFC 5280, fixed
JsonWebEncryption.encrypt()Concat KDF input whenapu/apvare absent per RFC 7518, omitted empty_sdarrays when generating SD-JWTs, fixed query-only URI parsing and improved HTTP error diagnostics inuriSchemePresentment(), and derived the MSO COSE signing algorithm from the document signer key inDocumentType.createMdocCredentialWithSampleData().