Skip to content

free2er/ed25519

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ed25519

Ed25519 key tools

Installation

This component can be installed with the Composer dependency manager.

  1. Install Composer

  2. Install the component as a dependency of your project

     composer require free2er/ed25519
    

Usage

Generate new key

use Free2er\Ed25519\Key;

$privateKey = Key::generate();

echo $privateKey->toPem();
echo $privateKey->toPublic()->toPem();

Create key from file

use Free2er\Ed25519\Key;

$privateKey = Key::createFromKeyFile('/path/to/private.key');

echo $privateKey->toPem();
echo $privateKey->toPublic()->toPem();

$publicKey = Key::createFromKeyFile('/path/to/public.key');

echo $publicKey->toPem();

OpenSSL commands

Generate private key

openssl genpkey -algorithm Ed25519 -out private.key

Extract public key

openssl pkey -in private.key -pubout -out public.key

About

Ed25519 key tools

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages