Hot answers tagged

12

I've been suggested to digitally sign it, thus, I have my private key, and I ship my application with a public key, and the application then uses the public key to check the QR code As long as you can live with the requirements for RSA (signature size, computation), that sounds like an excellent idea. Am I encrypting the whole message using the private ...


4

To your questions: You are not encrypting anything. Signing something with RSA is basically the same algorithm as decryption but some things are different (see below). No. You can generate one keypair and then use it for encryption, decryption, signing and verification. To help you with your task: Getting this right is not easy. If you have no ...


3

Firstly, it's not co-prime to the modulus, so $\gcd(m,N)$ would be greater than $1$. Secondly, $N$ is the product of two (and only two) prime numbers $p$ and $q$, so if $\gcd(m,N)>1$, then you know $m$ is one of the factors (and prime factors) of $N$.


3

Yes, these are public parameters of the system. Note that NTRU is not implemented exactly this way any more. The most up-to-date current spec is EESS#1, which can be obtained from https://github.com/NTRUOpenSourceProject/ntru-crypto/blob/master/doc/EESS1-v3.1.pdf.


2

The size we speak of with regard to elliptic curves is the size of the field over which the elliptic curve is defined. This is not necessarily exactly the size of the private key. For example: Curve25519 is a 255-bit elliptic curve and has, effectively, 252-bit private keys, though they are usually encoded as 256-bit values with four fixed bits. Public keys ...


1

I guess you are taking this information from this document. In Section 2.1 you can see a table with different sizes. In particular, a plaintext block (that is, an encoded message) has size $(n-k) \log_2 p$ bits, while a ciphertext has size $n \log_2 q$ bits. The explanation is simple: ciphertexts are actually polynomials of $n$ terms (since degree is $n-1$)...


1

An analogy might not be that helpful but an example for example with RSA signatures. RSA Signatures work like this: s = m^d mod N where s is the signature, m the message and d the private key. (See example below. Verification works like this: m' = s^e mod N where s is still the signature and e is the publicly known and trusted public key. If m' = m ...


1

Ok, here's a toy example (which really doesn't work) of a simple signature scheme, which you can use as an analogy of a real system: Suppose the signer Alice picks three integers $b, c, p$, and computes $a = b \times c \bmod p$. She then publishes $a, b, p$ as her public key, and keeps $c, p$ as her private key. Then, when Alice wants to sign a message $M$...


1

To decode from a public-key encoded message, you need the secret private key. Anyone else cannot do it. For the mathematical details how this is possible, you need to analyse the respective asymmetric cryptographic algorithms. There are several different asymmetrical encryption algorithms, including RSA and ElGamal, see the Wikipedia links for an ...


1

If you choose m such that gcd(m,N) #1, it implies that gcd(m,N)= p, one of the primes composing N, and in this case the code is broken. But you could always choose random numbers r, and calculate gcd(r,N), looking for the case its not equal 1. This is equivalent to factor N, and there are algorithms more efficient than this that factor N. On the contrary, if ...



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