Score:1

What is simple asymmetric encryption that use arbitrary key?

cn flag

While XOR is used as simple symmetric encryption with arbitrary custom key, what is a simple asymmetric encryption that use arbitrary custom key?

That means I want to be able to set custom private key or public key (in ASCII format).

Expectation:

pub = "mypubkey"
pri = "myprivkey"
msg = "hello world"

encrypted_msg = encrypt(msg, pub)
decrypted_msg = decrypt(encrypted_msg, pri)

print(decrypted_msg) # "hello world"
alpominth avatar
il flag
There are many asymmetric algorithms with predefined presets for achieving a certain security level, but some of them notice that the user can modify their presets to achieve a desired security. With McEliece you can use many security parameters for achieving your goal: https://en.wikipedia.org/wiki/McEliece_cryptosystem
Maarten Bodewes avatar
in flag
Modern cryptography operates on bits and bytes, not ASCII characters. For e.g. Elliptic Curve private keys, the key is a (derived) random value in the range 1..N with N being the field size. For practicing calculations you could use tiny insecure RSA primes that are represented by a character, but I don't see the point of that. In the end asymmetric algorithms mostly operate on fields represented by numbers, not characters.
Score:5
ng flag

With the standard definition of public key encryption (or signature), it's not possible to make the public key arbitrary†. If it was, the method to find a matching private key from public key would allow decryption (or signature).

It's possible, and common, that the private key is arbitrary (in some interval, which is easily extended to arbitrary text).

With Identity Based Encryption, each user's public key is arbitrary, and the authority's private key can be arbitrary. But user private (decryption) keys and the authority's public key can't be arbitrary. And it's not public key encryption by standard definition, since a user can't autonomously generate their keypair.


It's even less possible to make both public and private keys arbitrary, which would imply that anything is the private key of any public key.

Score:0
vu flag

If such silver bullet had existed, it'd already been discovered. And since it hasn't, we can safely assume it doesn't exist.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.