Export-Public-Ecdh

(export-public-ecdh ecdh-key) -> string

Given a private <ecdh-key>, produces the public, non-secret portion of that key. If the result is then handed to import-ecdh, the result of that will test true for ecdh-key? and ecdh-public-key?, but test false for ecdh-private-key?.

The string that is returned by export-public-ecdh should not be considered a "safe", or portable string. For storage and transmission purposes, wrapping it in base64-encode is recommended.

Examples:

>> (define Dp (export-public-ecdh Dq))
:: #f
>> (ecdh-key? (import-ecdh Dp))
:: #t
>> (ecdh-private-key? (import-ecdh Dp))
:: #f
>> (ecdh-public-key? (import-ecdh Dp))
:: #t
>> (define Cp (export-public-ecdh Cq))
:: #f