Skip to content

Migrating from Classical Cryptography

If you’re currently using Ed25519 for signatures or X25519 for key exchange, @brivora/crypto provides a smooth upgrade path to hybrid PQC.

import { crypto } from '@brivora/crypto';
const upgraded = await crypto.upgradeKey({
publicKey: existingEd25519PublicKey,
secretKey: existingEd25519SecretKey,
});
// upgraded.identity -- new hybrid PQC identity
// upgraded.migration -- signed proof linking old key to new key
const { valid } = await crypto.verify(upgraded.migration, oldPublicKey);
// valid === true -- the upgrade is cryptographically linked to the old key

Publish the migration proof so that anyone who trusted your old Ed25519 key can verify that your new hybrid PQC key is legitimate. The proof is signed by both the old and new keys.

PhaseActionDuration
1. UpgradeGenerate hybrid identities for all existing keysHours
2. Dual modeAccept both old Ed25519 and new hybrid signaturesWeeks-months
3. CutoverRequire hybrid signatures, deprecate classical-onlyWhen ready

During migration, hybrid mode ensures:

  • Old systems can still verify Ed25519 signatures from hybrid keys
  • New systems get full PQC protection
  • No breaking changes to existing verification flows