Skip to content

libsodium.PKI.EncryptionKey.Derive

Andrew Lambert edited this page Nov 26, 2022 · 5 revisions

Method Signature

 Shared Function Derive(PrivateKeyData As MemoryBlock) As libsodium.PKI.EncryptionKey

Parameters

Name Type Comment
PrivateKeyData MemoryBlock The user's private key (exactly crypto_scalarmult_BYTES long).

Return value

An instance of EncryptionKey containing the derived key pair, or Nil on error.

Remarks

Given a user's private key, this method derives an EncryptionKey pair. The PrivateKeyData is assumed to be high-entropy and is used directly as the private key. As such DO NOT use this method to derive a key pair from low-entropy data like a password: use EncryptionKey.Constructor(Password) instead.

Clone this wiki locally