80

exactly one message maps to a given hash This is not possible due to the pigeonhole principle. As long as the input message to the hash function can be larger than the hash itself, it is guaranteed that some messages collide with each other and map to the same hash. This is normal and is not a problem for the security of hashes by itself. You only need to ...


54

There is no way to do this - this is a subset of what DRM schemes attempt to do. If an end user can decrypt something once to see it, they can see it again. Any of the following may be possible: first take a copy and decrypt that copy the screen edit the application The only way you could get close would be to have total control over the hardware and ...


18

As you already hinted at, such a thing is only possible in hardware. A software or encrypted data solution would always suffer from the option of making a copy before decryption. In hardware, the scheme would be to destroy information on decryption. A naive approach would be to simply read a block into memory, destroy it on storage and then decrypt it. ...


15

First of all, a 1024-bit RSA key is much too small for comfort. Current recommendations for RSA are a debate between 3072 or 4096 (better security margin) vs. 2048 (better performance). See: https://crypto.stackexchange.com/questions/19655/what-is-the-history-of-recommended-rsa-key-sizes https://paragonie.com/blog/2019/03/definitive-2019-guide-cryptographic-...


12

It depends very much on what you want to achieve. First, as already pointed out by forest, what you actually want in terms of only one input maps one hash is -- in the gerneral case -- not possible. It is possible in special cases if the hash is as long as the input, or longer. Since you mentioned 32-bit integers, there exist indeed 32-bit integer-to-integer ...


7

If a network is available, you could offload the decryption procedure (and the private key) to a service running on a secure server. You could then enforce whatever rules you want on the server. The client would submit the opaque text to the service and ask it to decrypt it and return the plaintext content, and the server could decide whether the client ...


5

My overall goal is to be able to verify the message is valid, and retrieve the message (does not matter if it's visible or not) with the smallest overhead possible, with both endpoints under my control, but the communication is always stateless and easily modified by a third party. You don't seem to require encryption, since it "does not matter if [...


4

The output size of a hash function puts an upper bound on its security level. The three main properties any cryptographic hash function is expected to have is resistance to collision, first-preimage, and second-preimage attacks. If an algorithm has n-bit security, it means that there is no attack that breaks the relevant security properties which would ...


2

It is not in any way practical, and fundamentally impossible (in a reliable way), but it may be possible to some extent. The obvious hindrance which makes the endeavour fundamentally impossible is that whatever it is you decrypt, once you've read it, it's inside your head. So, to be sure the secret stays secret, there would have to be a poison pill ...


2

Is FeliCa encryption safe? Yes, but also no. Yes, insofar as there doesn't appear to be any published cryptanalysis attacks against the cryptography employed by FeliCa. No, because it isn't an open standard. This makes it difficult for cryptographers from all over the world to review and audit the function. Instead, Sony is relying on a small pool of ...


2

Yes, it's bad practice to use a key for two different purposes. This can have obvious or subtle problems. In this specific case, I don't see an obvious security problem. Rfc2898DeriveBytes implements PBKDF2, which is a key derivation function. Given the output, it's impossible to reconstruct the input except by guessing. Since a private key has enough ...


1

The 1024 bit number on the key describes the modulus used as part of encryption and decryption of a message (see https://security.stackexchange.com/a/8914/29905), which is paired with a public exponent for the public key and a private exponent for the private key - effectively, the message is first taken to the power of the public exponent e or the private ...


1

From a purely theoretical sense - it is only possible if you can make sure that after the first decrypt there are no copies in existence of both the decrypted data, and either the encrypted data or the key(s) needed to decrypt it. In principle, you can only do this with the cooperation (willing or coerced) of the parties that handle these pieces of ...


Only top voted, non community-wiki answers of a minimum length are eligible