Author

Topic: anyone can tell me what is this? (Read 301 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
February 25, 2023, 07:30:32 AM
#10

Thanks for example of running the program along with the explanation. I initially though the software isn't work as intended due to message "-i used with no filenames ...". Retesting the software, it works just fine on Debian 11 (dc 1.4.1 and perl 5.32.1).

Code:
$ cat rsa
#!/bin/perl -sp0777i$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
$ echo "squeamish ossifrage" | ./rsa -k=10001 -n=1967cb529 > msg.rsa
-i used with no filenames on the command line, reading from STDIN.
$ xxd msg.rsa
00000000: 073d 46d6 b56a de04 7b32 92f0 a363 c331  .=F..j..{2...c.1
00000010: e902 ee83 3b                             ....;
$ ./rsa -d -k=ac363601 -n=1967cb529 < msg.rsa
-i used with no filenames on the command line, reading from STDIN.
squeamish ossifrage
hero member
Activity: 510
Merit: 4005
July 07, 2023, 04:39:06 AM
#8
IMO, it's worth reading Adam Back's post (with the original 5-line version), and Hal Finney's reply: http://www.cypherspace.org/adam/rsa/org-post.html.

I think it says a lot about that era (and the concentration of talent on the Cypherpunks mailing list) that something like that was posted and within ~8.5 hours it was analyzed (cold), understood, and praised.
legendary
Activity: 978
Merit: 1080
February 24, 2023, 01:18:32 PM
#7
i found this from adam back's home page that says export crypto sig
the code is :
Code:
-export-a-crypto-system-sig -RSA-3-lines-PERL

#!/bin/perl -sp0777i$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)


i not a coder or developer so asking this , what is meaning of export crypto sig
http://www.cypherspace.org/adam/rsa/

The guide at http://www.cypherspace.org/adam/rsa/rsa-details.html works for me on my MacOS:

Code:
$ cat > rsa
#!/bin/perl -sp0777i$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
$ wc rsa
       3       7     178 rsa
$ echo "squeamish ossifrage" | ./rsa -k=10001 -n=1967cb529 > msg.rsa
-i used with no filenames on the command line, reading from STDIN.
$ ./rsa -d -k=ac363601 -n=1967cb529 < msg.rsa
-i used with no filenames on the command line, reading from STDIN.
squeamish ossifrage
$

Should work just as well on any Linux system...
It encrypts the message by taking numbers modulo 6819722537 (1967cb529 in hex) to the power 65537 (10001 in hex), and decrypts by taking numbers modulo 6819722537 to the power 2889233921 (ac363601 in hex),
which gives back the original since 65537 * 2889233921 = 1 mod phi(6819722537).
Note that n=6819722537 is the product of two primes p=66593 and q=102409 and thus phi(n) = (p-1)*(q-1).
See https://en.wikipedia.org/wiki/RSA_(cryptosystem) for details.

The seemingly odd choice of plaintext is explained in

https://en.wikipedia.org/wiki/The_Magic_Words_are_Squeamish_Ossifrage
legendary
Activity: 3458
Merit: 6231
Crypto Swap Exchange
February 24, 2023, 12:43:24 PM
#6
Wow, thanks for clarifying, I could have never imagined something like this was possible and actually happened. I didn't know RSA algo was banned or under export restrictions in the 1990ies in the US.  Shocked

Lots of things like that in terms of encryption were and still are banned for export. From what I have seen it's really not something they go after you for, but if you are being charged with a bunch of other crimes that goes with it too.

When they started to craft the law things looked a lot different from the internet / tech world standpoint then when it passed, and the way the world is today it's totally pointless.

-Dave
legendary
Activity: 2240
Merit: 1172
Privacy Servers. Since 2009.
February 23, 2023, 05:19:04 PM
#5
i not a coder or developer so asking this , what is meaning of export crypto sig
http://www.cypherspace.org/adam/rsa/

It's a throwback to the "old days" (1990s) where the USA had a bunch of export restrictions on cryptographic algorithms and programs and suchlike as they were classified as "munitions". The idea was to create the smallest working version of the RSA algorithm that could be included in an email signature (or a signature on a Usenet newsgroup post etc) so it could be shared publicly with everyone.

People had T-Shirts printed with the text... and it looks like someone actually had it tattooed on their arm:



(not to mention that this doesn't even look like valid Perl).
Perl is great like that Tongue

Wow, thanks for clarifying, I could have never imagined something like this was possible and actually happened. I didn't know RSA algo was banned or under export restrictions in the 1990ies in the US.  Shocked
HCP
legendary
Activity: 2086
Merit: 4314
February 22, 2023, 05:44:37 PM
#4
i not a coder or developer so asking this , what is meaning of export crypto sig
http://www.cypherspace.org/adam/rsa/

It's a throwback to the "old days" (1990s) where the USA had a bunch of export restrictions on cryptographic algorithms and programs and suchlike as they were classified as "munitions". The idea was to create the smallest working version of the RSA algorithm that could be included in an email signature (or a signature on a Usenet newsgroup post etc) so it could be shared publicly with everyone.

People had T-Shirts printed with the text... and it looks like someone actually had it tattooed on their arm:



(not to mention that this doesn't even look like valid Perl).
Perl is great like that Tongue
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
February 22, 2023, 09:29:01 AM
#3
Honestly I have no idea how to even run that as a program (let alone passing a sig file as an input to it). I'm getting a whole bunch of syntax errors when I pasted that into a perl file.

Me either, even after following the guide[1]. It's likely the problem lies within version of perl/dc.

[1] http://www.cypherspace.org/adam/rsa/rsa-details.html
[2] http://www.cypherspace.org/adam/rsa/story2.html, under big text "The commented version".

I'm not sure why an RSA encryption script would even need to use dc, because that is just a reverse polish calculator, and I know that Perl has its own set of arithmetic operators (not to mention that this doesn't even look like valid Perl).
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
February 22, 2023, 05:21:47 AM
#2
Honestly I have no idea how to even run that as a program (let alone passing a sig file as an input to it). I'm getting a whole bunch of syntax errors when I pasted that into a perl file.
full member
Activity: 448
Merit: 222
February 22, 2023, 02:11:25 AM
#1
i found this from adam back's home page that says export crypto sig
the code is :
Code:
-export-a-crypto-system-sig -RSA-3-lines-PERL

#!/bin/perl -sp0777i$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)


i not a coder or developer so asking this , what is meaning of export crypto sig
http://www.cypherspace.org/adam/rsa/
Jump to: