Use case: pre-key signatures and login challenges, where keys
exist as raw bytes (before wipe) and are NOT wrapped in Handle
objects. For identity/handle operations use @me2em/core's
Handle.sign instead.
The caller MUST wipe privateKey after use (see secureWipe).
Parameters
privateKey: Uint8Array
32-byte Ed25519 private key.
message: Uint8Array
The message bytes to sign.
Returns Uint8Array
64-byte Ed25519 signature.
Throws
'SIGNATURE_FAILED' if key length ≠ 32.
Example
constsig = signRaw(privateKey, message); secureWipe(privateKey); // done with the key
Raw Ed25519 signing for TRANSIENT key material.
Use case: pre-key signatures and login challenges, where keys exist as raw bytes (before wipe) and are NOT wrapped in Handle objects. For identity/handle operations use @me2em/core's Handle.sign instead.
The caller MUST wipe privateKey after use (see secureWipe).