Monero-Keys version 0.04 ======================== NAME Monero-Keys module to generate Monero cryptocurrency compatible keys. SYNOPSIS use Monero::Keys; my $keys; do { my $seed = random_32_bytes(); $keys = Monero::Keys::generate_keys($seed); } while (!defined($keys)); printf ("Spend Private key:%s \n", unpack('H*', $keys->{spend_pk})); printf ("Spend Public key:%s \n", unpack('H*', $keys->{spend_pub})); printf ("View Private key:%s \n", unpack('H*', $keys->{view_pk})); printf ("View Public key:%s \n", unpack('H*', $keys->{view_pub})); DESCRIPTION generate_keys($seed) This function generates Monero compatible keys from 32 bytes seed. The valid private keys in monero should less than L (L is 2^252 + 27742317777372353535851937790883648493). So private key = mod(seed, L). In case of seed is multiple of L, the function will return undef. In that case try another seed. The seed should be cryptographically secure random 32 bytes. SEE ALSO This module uses XS code from Crypt::PK::Ed25519 for point generation. It also uses sc_reduce32 function from Monero codebase for mod L operation. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: Crypt::Digest::Keccak256 Math::BigInt COPYRIGHT AND LICENCE Put the correct copyright and licence information here. Copyright (C) 2024 by Denys Fisher This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.34.1 or, at your option, any later version of Perl 5 you may have available.