RSA 2048, Blowfish, Rijndael, Whirlpool PureLib

Developed or developing a new product in PureBasic? Tell the world about it.
JCV
Enthusiast
Enthusiast
Posts: 580
Joined: Fri Jun 30, 2006 4:30 pm
Location: Philippines

RSA 2048, Blowfish, Rijndael, Whirlpool PureLib

Post by JCV »

Availabe PureLibs

Encryption/Decryption
1. RSA 2048 Bits
2. Blowfish
3. Rijndael

Hashing
1. Whirlpool

Before downloading the link below, you should be aware about encryption export laws on your country.
RSA 2048 Bit LINK
BLOWFISH LINK
RIJNDAEL LINK
WHIRLPOOL LINK

@traumatic thanks for your help. :D
Last edited by JCV on Mon Oct 16, 2006 3:28 pm, edited 4 times in total.
thamarok
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 06, 2006 1:37 pm

Post by thamarok »

Very nice!
This is very useful!
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: RSA 2048 bits PureLib

Post by traumatic »

JCV wrote:@traumatic thanks for your help. :D
:)
Good programmers don't comment their code. It was hard to write, should be hard to read.
localmotion34
Enthusiast
Enthusiast
Posts: 665
Joined: Fri Sep 12, 2003 10:40 pm
Location: Tallahassee, Florida

Post by localmotion34 »

2048 bit encryption in the US is illegal. The Dept of Homeland Security, and the US State Dept consider that strong an encryption to be a type of munition.

Selling any software to or from the US without approval from the Gov't is a Federal Crime, and for non-US citizens, can end you up in Gitmo or extradited to the US.

For all PB users outside the US, this is not an issue. You can sell your apps to persons outside the US, and while the US gov't can try and invoke long-arm jurisdiction, they really cant do anything.

Im not kidding. i do not agree with this totalitarian stance, but i am pointing out that for US users of PB, if you distribute an app using this lib's full encryption, you can get busted BIG TIME.

The National Security Agency must be able to decipher any sold encryption within a reasonable amount of time "in case they need to". This is just another example of the growing dictatorship the US is falling under.

Code: Select all

!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

thx for the lib

small bug:
after 2x decrypt the same string it crashes in the gui example
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Does this also mean that I am not allowed to take my laptop with me when traveling to the USA because I have GnuPGP installed? And why doesn't this apply to ssh?
localmotion34
Enthusiast
Enthusiast
Posts: 665
Joined: Fri Sep 12, 2003 10:40 pm
Location: Tallahassee, Florida

Post by localmotion34 »

Nik wrote:Does this also mean that I am not allowed to take my laptop with me when traveling to the USA because I have GnuPGP installed? And why doesn't this apply to ssh?
no you are fine doing that, but if you are a US citizen and you use this LIB, and then post it here where people of foreign countries can download it, you are violating US regulations on the export of encryption.

encryption is considered a munition like bombs and guns.

AND if you are a nonUS citizen and use this LIB, and then make it available to Us citizens, the US Gov't can extradite you for the same violation.

This is what we are living under in the US.

PLEASE RESEARCH ENCRYPTION EXPORT LAWS.

Code: Select all

!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Hmm well can't find a a good article on this subject but it seems critical. I don't understand yet wether this law also applies to non US citizens when traveling to the US and back. I mean I could be carrying a crypto algorithm on my laptop and then leaving the US would make me a wapon smuggler :lol:

Anyway I feel sorry for you guys
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

localmotion34 wrote:2048 bit encryption in the US is illegal. The Dept of Homeland Security, and the US State Dept consider that strong an encryption to be a type of munition.

Selling any software to or from the US without approval from the Gov't is a Federal Crime, and for non-US citizens, can end you up in Gitmo or extradited to the US.

For all PB users outside the US, this is not an issue. You can sell your apps to persons outside the US, and while the US gov't can try and invoke long-arm jurisdiction, they really cant do anything.

Im not kidding. i do not agree with this totalitarian stance, but i am pointing out that for US users of PB, if you distribute an app using this lib's full encryption, you can get busted BIG TIME.

The National Security Agency must be able to decipher any sold encryption within a reasonable amount of time "in case they need to". This is just another example of the growing dictatorship the US is falling under.
Edit: I just read online and it says that its not illegal to use it in america, its illegal to export it out of america.. Not 100% sure though.
I love Purebasic.
JCV
Enthusiast
Enthusiast
Posts: 580
Joined: Fri Jun 30, 2006 4:30 pm
Location: Philippines

Post by JCV »

Am I going to remove this lib for public then? :?

Then I wont post other encryption libs I have finished. I have lots of PureLibs here done like AES, Blowfish and other encryptions that are based from opensource c/c++/asm implementation on the net. :?

scary. :?
Im not from US. :D
localmotion34
Enthusiast
Enthusiast
Posts: 665
Joined: Fri Sep 12, 2003 10:40 pm
Location: Tallahassee, Florida

Post by localmotion34 »

JCV wrote:Am I going to remove this lib for public then? :?

Then I wont post other encryption libs I have finished. I have lots of PureLibs here done like AES, Blowfish and other encryptions that are based from opensource c/c++/asm implementation on the net. :?

scary :?
no, DO NOT remove this LIB. Simply add a text file that people must check their respective countries laws on encryption. It is their responsibility.

In the US, we must get a license from the Government to be able to sell or export software using this LIB to foreign customers.

Please do post your other encryption LIBS. i could definitely use them. if i want to stay out of trouble and use them in my shareware, i have to file paperwork with the government.

Other just need to know this. what you are doing is perfectly legal. you just must inform people that they need to read up on the laws using this. can you post your other libs so we can test them out?

Code: Select all

!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
Intrigued
Enthusiast
Enthusiast
Posts: 501
Joined: Thu Jun 02, 2005 3:55 am
Location: U.S.A.

Post by Intrigued »

Even if the information in this thread is skewed, thanks for at least getting us to think about such. (again, if it's skewed).

Thanks for the headsup in another words.

*thumbs up*
Intrigued - Registered PureBasic, lifetime updates user
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

I bet FBI will storm JCV's house now and take his computer and all his sourcecodes and then put him in jail for lifetime! :D

JCV, I say you should give a damn about it, please share your great code! :)
I like logic, hence I dislike humans but love computers.
JCV
Enthusiast
Enthusiast
Posts: 580
Joined: Fri Jun 30, 2006 4:30 pm
Location: Philippines

Post by JCV »

I added another library

BLOWFISH and RIJNDAEL

See first post.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Excellent! Thanks for sharing this and making it available to the community. I tried out the Blowfish lib and got perfect results. If I could make one tiny suggestion, it would be that you compile this code:

Code: Select all

Structure BLOWFISH_CTX
  P.l[18]
  StructureUnion
    S0.l[256]
    S1.l[256]
    S2.l[256]
    S3.l[256]
  EndStructureUnion
EndStructure
with TailBite, which would create a compiled resident for this structure that you could distribute with the lib. Just makes it easier to use the library to not have to remember the structure. Thanks again for your generosity.
Post Reply