[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/ -> libsodium.php (summary)

libsodium Key Handler Different NaCl implementations store the key differently. https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/ elaborates. libsodium appears to use the same format as SUPERCOP.

Author: Jim Wigginton
Copyright: 2015 Jim Wigginton
License: http://www.opensource.org/licenses/mit-license.html MIT License
Link: http://phpseclib.sourceforge.net
File Size: 116 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions

  load()
  savePublicKey()
  savePrivateKey()

Functions
Functions that are not part of a class:

load($key, $password = '')   X-Ref
Break a public or private key down into its constituent components

param: string $key
param: string $password optional
return: array

savePublicKey(Ed25519 $curve, array $publicKey)   X-Ref
Convert an EC public key to the appropriate format

param: \phpseclib3\Crypt\EC\Curves\Ed25519 $curve
param: \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
return: string

savePrivateKey(BigInteger $privateKey, Ed25519 $curve, array $publicKey, $secret = null, $password = '')   X-Ref
Convert a private key to the appropriate format.

param: \phpseclib3\Math\BigInteger $privateKey
param: \phpseclib3\Crypt\EC\Curves\Ed25519 $curve
param: \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
param: string $secret optional
param: string $password optional
return: string