Guest User

Untitled

a guest
May 25th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.72 KB | None | 0 0
  1. use Crypt::RSA;
  2.      
  3. use Crypt::RSA::ES::OAEP;
  4.      
  5. use Crypt::RSA::Key::Private;
  6.      
  7. use Crypt::RSA::Key;
  8.      
  9. use Math::Pari ':int';
  10.      
  11. use Crypt::RSA;
  12.  
  13. my $oaep = new Crypt::RSA::ES::OAEP;
  14.  
  15. my $key = ($key => "d")
  16.  
  17. my $pt = $oaep->decrypt(
  18.                         Key => $key,
  19.                         Cyphertext => "-----BEGIN COMPRESSED RSA ENCRYPTED MESSAGE-----
  20.                                       Version: 1.99
  21.                                       Scheme: Crypt::RSA::ES::OAEP
  22.  
  23.                                       DATABLOCK
  24.  
  25.                                       -----END COMPRESSED RSA ENCRYPTED MESSAGE-----",
  26.  
  27.                         )   ||
  28.           die $oaep->errstr;
  29.  
  30. print $pt;
Add Comment
Please, Sign In to add comment