Home / Cardano Foundation / cardano-wallet
May 28, 6-7 PM (0)
May 28, 7-8 PM (0)
May 28, 8-9 PM (0)
May 28, 9-10 PM (0)
May 28, 10-11 PM (0)
May 28, 11-12 AM (0)
May 29, 12-1 AM (0)
May 29, 1-2 AM (0)
May 29, 2-3 AM (0)
May 29, 3-4 AM (0)
May 29, 4-5 AM (0)
May 29, 5-6 AM (0)
May 29, 6-7 AM (0)
May 29, 7-8 AM (0)
May 29, 8-9 AM (0)
May 29, 9-10 AM (0)
May 29, 10-11 AM (0)
May 29, 11-12 PM (0)
May 29, 12-1 PM (0)
May 29, 1-2 PM (0)
May 29, 2-3 PM (0)
May 29, 3-4 PM (0)
May 29, 4-5 PM (0)
May 29, 5-6 PM (0)
May 29, 6-7 PM (0)
May 29, 7-8 PM (0)
May 29, 8-9 PM (0)
May 29, 9-10 PM (0)
May 29, 10-11 PM (0)
May 29, 11-12 AM (0)
May 30, 12-1 AM (0)
May 30, 1-2 AM (0)
May 30, 2-3 AM (0)
May 30, 3-4 AM (0)
May 30, 4-5 AM (0)
May 30, 5-6 AM (0)
May 30, 6-7 AM (0)
May 30, 7-8 AM (0)
May 30, 8-9 AM (0)
May 30, 9-10 AM (0)
May 30, 10-11 AM (0)
May 30, 11-12 PM (0)
May 30, 12-1 PM (0)
May 30, 1-2 PM (0)
May 30, 2-3 PM (0)
May 30, 3-4 PM (0)
May 30, 4-5 PM (0)
May 30, 5-6 PM (0)
May 30, 6-7 PM (0)
May 30, 7-8 PM (0)
May 30, 8-9 PM (0)
May 30, 9-10 PM (0)
May 30, 10-11 PM (0)
May 30, 11-12 AM (0)
May 31, 12-1 AM (0)
May 31, 1-2 AM (0)
May 31, 2-3 AM (0)
May 31, 3-4 AM (0)
May 31, 4-5 AM (0)
May 31, 5-6 AM (0)
May 31, 6-7 AM (0)
May 31, 7-8 AM (0)
May 31, 8-9 AM (0)
May 31, 9-10 AM (0)
May 31, 10-11 AM (0)
May 31, 11-12 PM (0)
May 31, 12-1 PM (0)
May 31, 1-2 PM (0)
May 31, 2-3 PM (0)
May 31, 3-4 PM (0)
May 31, 4-5 PM (0)
May 31, 5-6 PM (0)
May 31, 6-7 PM (0)
May 31, 7-8 PM (0)
May 31, 8-9 PM (0)
May 31, 9-10 PM (0)
May 31, 10-11 PM (0)
May 31, 11-12 AM (0)
Jun 01, 12-1 AM (0)
Jun 01, 1-2 AM (0)
Jun 01, 2-3 AM (0)
Jun 01, 3-4 AM (0)
Jun 01, 4-5 AM (0)
Jun 01, 5-6 AM (0)
Jun 01, 6-7 AM (0)
Jun 01, 7-8 AM (0)
Jun 01, 8-9 AM (0)
Jun 01, 9-10 AM (0)
Jun 01, 10-11 AM (0)
Jun 01, 11-12 PM (0)
Jun 01, 12-1 PM (0)
Jun 01, 1-2 PM (0)
Jun 01, 2-3 PM (0)
Jun 01, 3-4 PM (0)
Jun 01, 4-5 PM (1)
Jun 01, 5-6 PM (0)
Jun 01, 6-7 PM (0)
Jun 01, 7-8 PM (0)
Jun 01, 8-9 PM (0)
Jun 01, 9-10 PM (0)
Jun 01, 10-11 PM (0)
Jun 01, 11-12 AM (0)
Jun 02, 12-1 AM (0)
Jun 02, 1-2 AM (0)
Jun 02, 2-3 AM (0)
Jun 02, 3-4 AM (0)
Jun 02, 4-5 AM (0)
Jun 02, 5-6 AM (0)
Jun 02, 6-7 AM (0)
Jun 02, 7-8 AM (0)
Jun 02, 8-9 AM (0)
Jun 02, 9-10 AM (0)
Jun 02, 10-11 AM (0)
Jun 02, 11-12 PM (1)
Jun 02, 12-1 PM (4)
Jun 02, 1-2 PM (0)
Jun 02, 2-3 PM (6)
Jun 02, 3-4 PM (0)
Jun 02, 4-5 PM (0)
Jun 02, 5-6 PM (0)
Jun 02, 6-7 PM (0)
Jun 02, 7-8 PM (0)
Jun 02, 8-9 PM (0)
Jun 02, 9-10 PM (0)
Jun 02, 10-11 PM (0)
Jun 02, 11-12 AM (0)
Jun 03, 12-1 AM (0)
Jun 03, 1-2 AM (0)
Jun 03, 2-3 AM (0)
Jun 03, 3-4 AM (0)
Jun 03, 4-5 AM (0)
Jun 03, 5-6 AM (0)
Jun 03, 6-7 AM (0)
Jun 03, 7-8 AM (0)
Jun 03, 8-9 AM (0)
Jun 03, 9-10 AM (0)
Jun 03, 10-11 AM (0)
Jun 03, 11-12 PM (0)
Jun 03, 12-1 PM (0)
Jun 03, 1-2 PM (0)
Jun 03, 2-3 PM (0)
Jun 03, 3-4 PM (0)
Jun 03, 4-5 PM (0)
Jun 03, 5-6 PM (0)
Jun 03, 6-7 PM (0)
Jun 03, 7-8 PM (0)
Jun 03, 8-9 PM (0)
Jun 03, 9-10 PM (0)
Jun 03, 10-11 PM (0)
Jun 03, 11-12 AM (0)
Jun 04, 12-1 AM (0)
Jun 04, 1-2 AM (0)
Jun 04, 2-3 AM (0)
Jun 04, 3-4 AM (0)
Jun 04, 4-5 AM (0)
Jun 04, 5-6 AM (0)
Jun 04, 6-7 AM (0)
Jun 04, 7-8 AM (0)
Jun 04, 8-9 AM (0)
Jun 04, 9-10 AM (0)
Jun 04, 10-11 AM (0)
Jun 04, 11-12 PM (0)
Jun 04, 12-1 PM (0)
Jun 04, 1-2 PM (0)
Jun 04, 2-3 PM (0)
Jun 04, 3-4 PM (0)
Jun 04, 4-5 PM (0)
Jun 04, 5-6 PM (0)
Jun 04, 6-7 PM (0)
12 commits this week May 28, 2026 - Jun 04, 2026
nix: add libsodium-vrf pkgconfig override for cardano-crypto-wallet
cardano-crypto-wallet links against libsodium for Argon2id KDF and
XChaCha20-Poly1305 AEAD. Without this override, the Windows
cross-compiled DLL links against the default system libsodium, which
is not available in the Wine iserv environment (only libsodium-vrf is
present there, used by all other crypto packages).

This caused the iserv to crash (exit 1) at TH-module boundaries when
compiling cardano-wallet for Windows/ucrt64.
fix: update tests and tools to IO-returning crypto API
- wallet-key-export.hs: pattern-match HashedCredentials instead of
  tuple; V2 keys exit with a clear error (no XPrv export possible)
- wallet-key-export-test.hs: wrap serializeXPrv args in HashedCredentialsV1
- PersistPrivateKeySpec.hs: bind IO-returning encryptedCreate with >>=
- LayerSpec.hs: remove now-redundant XPrv import (Werror)
- Cardano.Wallet: use encryptedChainCode in decryptV2 to supply the
  missing 32-byte chain code so CC.xprv receives the full 96 bytes
chore: update cardano-crypto-wallet SRP to cb068e0 and adapt to IO API
The merged cardano-base PR changed encryptedCreateDirectWithTweak,
encryptedValidatePassphrase, and encryptedKeyMaterial to return IO
instead of pure Either, since they operate on locked memory.

- Bump SRP tag to cb068e0 (merged HEAD of cardano-base master)
- mkV2Credentials: lift to IO, bind encryptedCreateDirectWithTweak
- attachPrivateKeyFromPwd: bind mkV2Credentials with <-
- withRootKey: separate STM read from IO validation so
  encryptedValidatePassphrase can run outside atomically
- migrateV1toV2: bind encryptedCreateDirectWithTweak with >>=
- decryptV2: lift to IO; use mlsbToByteString + mlsbFinalize instead
  of BA.convert (MLockedSizedBytes has no ByteArrayAccess instance)
feat: upgrade root-key storage to v2 (Argon2id+XChaCha20-Poly1305)
Integrates the new cardano-crypto-wallet-v2 package from cardano-base,
replacing the legacy PBKDF2/ChaCha20 passphrase scheme for root key
storage with an authenticated v2 envelope format.

Key changes:

- HashedCredentials is now a sum type (V1 / V2) stored in the same DB
  columns; v1 keys are the existing 128-byte XPrv blob, v2 keys are a
  longer CBOR envelope distinguished by byte length on read-back.

- withRootKey opportunistically migrates v1 keys to v2 on every
  successful passphrase use, atomically and silently, so no user action
  or schema migration is needed.

- attachPrivateKeyFromPwd now always creates v2 credentials for new
  wallets; a reattachPrivateKey helper handles wallet delete-recreate
  flows (shared wallet activation) preserving the credential format.

- GET /v2/wallets/:id now includes encryption_method in the passphrase
  object ("scrypt", "pbkdf2-hmac-sha512", or "argon2id-v2"), allowing
  frontends to detect legacy keys and prompt for a passphrase change.
  The Byron wallet handler also gains an EncryptWithArgon2idV2 branch
  that was previously a silent fallthrough to Nothing.

- PassphraseScheme gains a FromText instance to support JSON round-trips
  via ApiT.

Test coverage added:

- PersistPrivateKeySpec: 6 roundtrip tests covering V1 Shelley/Byron and
  V2 Shelley/Byron (no-payload and with-payload) serialization, plus
  column-length and empty-hash invariants for V2 keys. Uses seed
  0x02*32 (a valid ed25519 extended-key seed) for deterministic V2 key
  construction.

- WalletSpec: three migration scenario tests — V1→V2 upgrade on
  passphrase use, rejection on wrong passphrase, and V2 idempotency.

Supporting fixes:

- WalletFlavor: added instance for TestState so DummyState satisfies
  the WalletFlavor constraint needed by withRootKey and related ops.

- Credentials: added Show instance for HashedCredentials.

- DerivationSpec, LayerSpec, StoreSpec: updated to the new
  HashedCredentials API (constructors, serialization signatures).
nix: add libsodium-vrf pkgconfig override for cardano-crypto-wallet
cardano-crypto-wallet links against libsodium for Argon2id KDF and
XChaCha20-Poly1305 AEAD. Without this override, the Windows
cross-compiled DLL links against the default system libsodium, which
is not available in the Wine iserv environment (only libsodium-vrf is
present there, used by all other crypto packages).

This caused the iserv to crash (exit 1) at TH-module boundaries when
compiling cardano-wallet for Windows/ucrt64.
fix: update tests and tools to IO-returning crypto API
- wallet-key-export.hs: pattern-match HashedCredentials instead of
  tuple; V2 keys exit with a clear error (no XPrv export possible)
- wallet-key-export-test.hs: wrap serializeXPrv args in HashedCredentialsV1
- PersistPrivateKeySpec.hs: bind IO-returning encryptedCreate with >>=
- LayerSpec.hs: remove now-redundant XPrv import (Werror)
- Cardano.Wallet: use encryptedChainCode in decryptV2 to supply the
  missing 32-byte chain code so CC.xprv receives the full 96 bytes
chore: update cardano-crypto-wallet SRP to cb068e0 and adapt to IO API
The merged cardano-base PR changed encryptedCreateDirectWithTweak,
encryptedValidatePassphrase, and encryptedKeyMaterial to return IO
instead of pure Either, since they operate on locked memory.

- Bump SRP tag to cb068e0 (merged HEAD of cardano-base master)
- mkV2Credentials: lift to IO, bind encryptedCreateDirectWithTweak
- attachPrivateKeyFromPwd: bind mkV2Credentials with <-
- withRootKey: separate STM read from IO validation so
  encryptedValidatePassphrase can run outside atomically
- migrateV1toV2: bind encryptedCreateDirectWithTweak with >>=
- decryptV2: lift to IO; use mlsbToByteString + mlsbFinalize instead
  of BA.convert (MLockedSizedBytes has no ByteArrayAccess instance)
nix: rename cardano-crypto-wallet ed25519 symbols to avoid iserv crash
cardano-crypto and cardano-crypto-wallet both bundle ed25519.c with the
same ED25519_FN macro prefix (cardano_crypto_), producing duplicate
cardano_crypto_ed25519_* symbols.  The GHC runtime linker (used by iserv
for Template Haskell evaluation) is strict about duplicates and aborts on
the first affected module, breaking every TH splice in the cross build.

Fix via postPatch: sed the macro definition and all direct call sites in
the four affected C files, renaming cardano_crypto_##fn → ccw_##fn and
cardano_crypto_ed25519 → ccw_ed25519.  No Haskell FFI changes are needed
because the Haskell bindings only import wallet_encrypted_* / wallet_sodium_*
symbols, not the ed25519 internals directly.
fix: update tests and tools to IO-returning crypto API
- wallet-key-export.hs: pattern-match HashedCredentials instead of
  tuple; V2 keys exit with a clear error (no XPrv export possible)
- wallet-key-export-test.hs: wrap serializeXPrv args in HashedCredentialsV1
- PersistPrivateKeySpec.hs: bind IO-returning encryptedCreate with >>=
- LayerSpec.hs: remove now-redundant XPrv import (Werror)
- Cardano.Wallet: use encryptedChainCode in decryptV2 to supply the
  missing 32-byte chain code so CC.xprv receives the full 96 bytes