Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 72e1ac8
  • /
  • bn.pl
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:388e19c6dea650fc4eedc17e2e0b685caf255fe0
directory badge Iframe embedding
swh:1:dir:72e1ac845e1e2c2c3aa79ef56db7ae5647a322dc
bn.pl
#!/usr/local/bin/perl
use ExtUtils::testlib;
use SSLeay;

$message=SSLeay::BN::new();
$e=SSLeay::BN::new();
$mod=SSLeay::BN::new();

$mod=SSLeay::BN::dec2bn("114381625757888867669235779976146612010218296721242362562561842935706935245733897830597123563958705058989075147599290026879543541");
$e=5;
$d=SSLeay::BN::dec2bn("45752650303155547067694311990458644804087318688496945025024737159778909096647814932594914301288138204957467016445183857236173773");

$message=SSLeay::BN::bin2bn("The magic words are squeamish ossifrage");


	$cipher_text=	$message->mod_exp($e,$mod);
print $mod."\n";
print $mod->num_bits()."\n";
for (1 .. 1000)
	{
	$clear=		$cipher_text->mod_exp($d,$mod);
	}
print $clear->bn2bin()."\n";

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top