New answers tagged

0 votes

How do I try a timing attack on a public-key implementation on a general-purpose computer?

(Note that I'm a defender, not an attacker. I'm usually confronted with descriptions of successful attacks, and tasked to defend against them. Professionals can surely mount attacks far more ...
0 votes

How do I try a timing attack on a public-key implementation on a general-purpose computer?

I've seen this handled by instrumenting the function itself, calling it from a thin wrapper that computes execution time using clock_gettime or RTDSC, and outputs/logs that (preferably, at each ...
  • 126k
3 votes
Accepted

How does this libgcrypt elgamal decryption work?

The recipient has private key $x$ with the corresponding public key $Y=G^x$. To encrypt $M$ for the recipient, pick a uniformly random private key $k$, and calculate the ciphertext $(A,B) = (G^k, Y^k\...
  • 3,917
3 votes

Bactracking resistance PRNG - real world usage

No, because there still needs to be one key exchange, and if an adversary can get this very first key, he is able to compute every other key by simulating the pseudorandom bit generator. The idea of ...
  • 1,692
5 votes

What asymmetric encryption to use that is safe against quantum computers?

As @kelalaka already mentioned, standardization is not finished yet. There are candidates for PQ-crypto, but they are still analyzed and revisited. Here you can find the current finalists and ...
  • 1,692
12 votes
Accepted

Validating an RSA public key

Given a pair of integers $(n,e)$, we can quickly decide that it is not a valid RSA key (mathematically, or in the sense of conforming to the de-facto standard PKCS#1, or in the sense of providing ...
  • 126k
5 votes

Validating an RSA public key

Well, for $e$, you can certainly test if $e$ is an odd number greater than 1; any such $e$ is a possible public exponent, and and it is infeasible to determine if $\gcd( e, \phi(n)) > 1$, and so ...
  • 135k
2 votes
Accepted

Is it true that Public keys with even y coordinate correspond to private key that are less than n/2 and vice versa? (Secp256k1)

A little test with Sagemath for the first 10 integers as the private key; ...
  • 44.3k
1 vote

QR-PKE not CCA secure

For the sake of completion, I'm posting the answer here, with help from @erth : The following is the interaction in the CCA security game (key points): The adversary sends the two challenge options: $...
  • 311
0 votes

Why do web-services tend to use preshared secret keys for client authentication instead of public keys?

The TLS infrastructure is already there to secure the connection between the endpoints, so just slipping a shared secret or bearer token inside of it for authentication (i.e. you are who you say you ...
1 vote

Why do web-services tend to use preshared secret keys for client authentication instead of public keys?

In my experience there’s a better solution. If you look at most apis they just include the api key in the header. I believe this is the root of your concern is that it’s not hidden and there is no way ...
  • 11
1 vote

How to modify elliptic curve point?

Q(5555555555) % 2500 = Q(55) how to do this ? We hope you can't do this (on a large elliptic curve, and without knowing the private key 5555555555 - if you can, then ECC is broken. After all, if you ...
  • 135k
1 vote

How to modify elliptic curve point?

In standard Elliptic Curve cryptography, the private key can be reduced modulo the order of the generator point, without changing the matching public key. That order is often noted $n$. In the ...
  • 126k
12 votes
Accepted

Why do web-services tend to use preshared secret keys for client authentication instead of public keys?

To go along with what others have said, I also don't think this is quite right: if the platform's database is compromised, all the secrets are leaked The server should be storing a hash of the API ...
  • 236
4 votes

Why do web-services tend to use preshared secret keys for client authentication instead of public keys?

As Colonel Thirty Two said: "What threat model" you are trying to protect against? Threat Models A breach against the client would provide the attacker access to the private key as easily as ...
  • 41
29 votes

Why do web-services tend to use preshared secret keys for client authentication instead of public keys?

I don't think it makes sense to call these kinds of tokens "symmetric keys", because they are not encryption keys that are used as input to a symmetric cipher. They are bearer tokens that ...
  • 391
8 votes

Why do web-services tend to use preshared secret keys for client authentication instead of public keys?

If I'm talking to an API endpoint that uses a symmetric key, I can easily invoke that using cURL on the command line or fetch in Javascript. A junior developer could integrate with the API in just a ...
  • 3,917
1 vote

Is it possible to design an algorithm that is based on the xor of the plaintext bits?

If I get the question correctly, what's asked is impossible. Argument: Assume $A$ exists. We'll use it, and the three algorithms of the public key encryption scheme, in order to tell if a cryptogram $...
  • 126k
2 votes
Accepted

In a Diffie-Hellman key exchange Find this key and compute the shared secret key k

Hearing that the private key is relatively small means that probably you could compute it via brute-force, meaning just trying values until you find the answer. So, you have your generator $g=3$ and ...

Top 50 recent answers are included