AsymmetricCryptography : An extension for asymmetric cryptography

Hi @Ragna
After searching a lot I found that extension can only work perfectly with key pair generated using the extension itself.
If you try to use an external Key Pair then there are chances that it will be able to encrypt but not decrypt.
Since not all online websites generate private key in PKCS8 format.

And to Screen Initialize issue there is no solution available unfortunately.

But I shall update it as there are some minor bugs in v2.

ChangeLog Version3

Changes

  • Minor bug fixes
  • Some internal changes

Aix
com.sunny.AsymmetricCryptography.aix (8.6 KB)

It seems I can't use a private key for encryption to use it for signing or am I missing something?
That would be a nice feature to have. Probably needs two new Blocks though.

Hi @Semper_Roto Welcome
As far as I know, both keys can be interchanged.
That's why it is called Key-Pair.

I agree with @vknow360 here. In asymmetric cryptography, encryption is done by using the public key of the intended recipient to encrypt the message. Whereas for signing, you sign a message by using your own private key. In the former case, since you only know the public key of the user you can only construct a message readable by the holder of the private key corresponding to the public key. For signing, you're asserting "I am the holder of the private key associated with this public key and you can confirm that by computing an equivalent value using the public key" (which everyone knows).

More broadly, encryption as we know it today belongs to the field of CS problems known as NP-hard (at least as hard as non-deterministic polynomial time) problems. An intuitive way of looking at these problems is "hard to solve but easy to verify". Encryption is the "hard to solve" part, i.e., it's easy to solve if you have the private key but hard otherwise, whereas signing is "easy to solve", i.e., as long as anyone knows the public key they can verify a signature.

1 Like

The aix is nice done, but is there a method to check if a keypair matches? I would add a recovery page where you put in your private key, and it just generates the public one again.

Hi @GrandPy Welcome to community
It does not seem posssible.

RSA will not work unless N is known by both parties.This extension does not return N

That's why you should share public key.

public key by itself means nothing unlkess you have N to mod it

But why you want to crack it?
You can decrypt it when you have one key of key pair.

Hi. The public key is basically a random prime number, so for 2 or more different 'codes' you can have the same public key., in RSA. The private key is derived by a maths function of the prime factors of N, as this is the modulas to be used on the output. So just having the public key mean nothings without N. Perhaps the video was a bit misleading, as there are other ways to crack RSA code, the challenge is to get the prime factors of N. I have a link http://delphiforfun.org/programs/math_topics/RSA_KeyDemo.htm which explains it better than i can.

I am still unable to understand what your actual query is.
Is it about security of RSA? or about its usage in the extension? or you want the extension to provide modulas and exponent?

There is no query, just a statement. RSA will not work unless N is known by both parties, and i see no way to extract N from your component, although it raises an interesting question, how did you get Java to handle the big numbers, i thought it was limited to 2^31

It is open source now:

Kindly have a look yourself.

2 Likes

ChangeLog Version 3.1

New Blocks
image

Changes

  • GenerateKeys method now works asynchronously
3 Likes

what should i type in the encryption key? pls help : (

Hi @akuma123_gaming, Welcome to the Community

You need to generate it.

thanks a lot