asymetrical encryption/decryption?
Moderator: MSandro
asymetrical encryption/decryption?
Does GP featrue an asymetrical cryptosystem? If not it would be nice if something like RSA rould be implemented.
Re: asymetrical encryption/decryption?
I think you could just add this in a project with blocks because right now GP supports hashing, SHA256, and encoding for multiple things.
Re: asymetrical encryption/decryption?
Hmm, I am able to use asymetrical cryptosystems (generating private and public keys tor transfer data over networks between my Python projects) but I am not an expert, so I don't know how souch system works in detail. I am not sure if souch hashing tools like sha256 are enoght to build my own asymetrical encryption and decryption system. But I'll try to experiment a bit more with those functionalities already buildin GP.
Re: asymetrical encryption/decryption?
Hi, I have tried working with asymmetrical encryption in GP with limited success. The biggest problem that I ran into was that there is a limit to how large integers are allowed to be in GP (1073741823 is the largest allowed integer).
Re: asymetrical encryption/decryption?
Interessting, yes the integers are not that big. But could you upload your sucess try as an project please? I wasn't sucess yet to something simular, I know how to use several asymetrical entryption-tools but I don't exactly know how those cryptosystems works.
Re: asymetrical encryption/decryption?
Is there no big math in GP?
Re: asymetrical encryption/decryption?
There is a little bit of support (addition of big numbers)Is there no big math in GP?
I had a go at trying to add multiplication in a earlier beta but it wasn't at all optimised for speed so would be too slow
Simon
Re: asymetrical encryption/decryption?
As Gosha pointed out, the RSA encryption system involves multiplying and taking the modulus of very large numbers (500-1000 decimal digits). If you have a system that supports working with such large integers, then RSA isn't too difficult to implement. As I recall, the most difficult part is generating a key pair, which involves finding large prime numbers. But one could use a Linux command line tool to generate the key pair.
Unfortunately, GP does not currently have a large integer class. So, an interesting subproblem is to create such a class that supports basic arithmetic (+, -, *, and /) and printing large integers. When I was working on the Squeak project, I implemented such a package, and it was actually sort of interesting. You use the same algorithms for addition, subtraction, multiplication, and division that you learned back in elementary school, but typically use a large base like 256 rather than base 10 so you can process more bits with each of the processor's multiple/divide instructions. I used this book as my guide:
https://www.amazon.com/Art-Computer-Pro ... 0201896842
But Wikipedia articles might also be a good reference, if anyone wants to take this on. Strange as it may sound, implementing arithmetic that works for arbitrarily large integers is actually fun!
Unfortunately, GP does not currently have a large integer class. So, an interesting subproblem is to create such a class that supports basic arithmetic (+, -, *, and /) and printing large integers. When I was working on the Squeak project, I implemented such a package, and it was actually sort of interesting. You use the same algorithms for addition, subtraction, multiplication, and division that you learned back in elementary school, but typically use a large base like 256 rather than base 10 so you can process more bits with each of the processor's multiple/divide instructions. I used this book as my guide:
https://www.amazon.com/Art-Computer-Pro ... 0201896842
But Wikipedia articles might also be a good reference, if anyone wants to take this on. Strange as it may sound, implementing arithmetic that works for arbitrarily large integers is actually fun!