Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Crypt::RSA;
- use Crypt::RSA::ES::OAEP;
- use Crypt::RSA::Key::Private;
- use Crypt::RSA::Key;
- use Math::Pari ':int';
- use Crypt::RSA;
- my $rsa = new Crypt::RSA;
- my $privkey = bless( {
- 'p' => 'NUMBER',
- 'q' => 'NUMBER',
- 'd' => 'NUMBER',
- 'e' => '66537',
- 'n' => 'NUMBER',
- 'phi' => 'NUMBER',
- 'dp' => 'NUMBER',
- 'dq' => 'NUMBER',
- 'Version' => '1.99',
- 'Identity' => ''
- }, 'Crypt::RSA::Key::Private' );
- my $plaintext = $rsa->decrypt (
- Cyphertext => "- -----BEGIN COMPRESSED RSA ENCRYPTED MESSAGE-----
- Version: 1.99
- Scheme: Crypt::RSA::ES::OAEP
- CRYPTEDDATABLOCK
- - -----END COMPRESSED RSA ENCRYPTED MESSAGE-----",
- Key => $privkey,
- Armour => 1,
- ) or die $rsa->errstr();
- print $plaintext;
Add Comment
Please, Sign In to add comment