Latest Crypto related questions

Score: 1
Mangudai avatar
Does game-theoretical fairness work in when the goal of one party is randomness
gp flag

When we take the coin flip in Blum's algorithm in "Coin flipping by telephone a protocol for solving impossible problems", where Alice and Bob both want ownership over the same car, then one party (the adversary / Alice) can abort the protocol. Provided there does exist a powerful third party (e.g. the law), the protocol can be extended, to give the car to Bob in case Alice aborts. This makes the algori ...

Score: 3
ceaaj avatar
How does JOSE/JWE make use of ECDH when encrypting/decrypting messages?
bg flag

Disclaimer: I first posted this question on security.stackexchange some minutes ago but deleted it, this is probably a better place for it.

My goal is to use JWE with hybrid encryption (ECDH+AES) for exchanging sensitive data with another party. However, the example code I can find for various Java libraries doesn't match my understanding of how ECDH or asymmetric encryption with EC works in gener ...

Score: 0
Rami avatar
Question about Asymmetric key wrapping using (limited) AES-GCM
nr flag

assuming that I have an RSA key of length 4k bit which I'm interested to wrap using AES-GCM, and I have a (limited) AES-GCM cipher which can only encrypt limited input in size (say 256-bit/512-bit input) per invocation. Is there a way/conditions to fulfill when splitting this 4k bit key into smaller keys to fit my (limited) AES-GCM and yet get the same security as when using an unlimited AES-GCM (encryp ...

Score: 1
firesilver avatar
Is there a good website to circulate RFCs
eg flag

I'm drafing an RFC for a low computation crypto algorithm, intended for low power bluetooth communication. Likely without a connection using advertisements only.

It's going to include raw C code examples so it should be quite portable.

Is there a good site to post my RFC to, where it will be more visible than say, my dumb website where nobody goes.

Much the same way medium circulates writing. Im not ve ...

Score: 1
MFL avatar
AES-GCM for sensitive database field - good solution?
cv flag
MFL

I have been researching the best encryption to use in a .NET application for managing a sensitive database field (column). This encryption is on top of e.g. AWS at-rest encryption applied to the whole of the database and is aimed at frustrating use of the sensitive data by anyone other than the application (which knows the encryption key). Defence in-depth!

It seems to me from lots of reading tha ...

Score: 1
Jake Nelson avatar
ED25519, RSA, Post Quantum Encryption confirmation
gw flag

I am working on a chat feature to use both post quantum cryptography along with RSA, and want to confirm my thoughts.

As these algorithms haven't been fully battle tested, I have decided to use a combination of both PQE and usual public, secret key cryptography

I decided upon the best algorithms to use for security.

  • Signing: ED25519
  • PQE KEM: McEliece
  • NON-PQE KEM: RSA 4096

We are currently using ...

Score: 5
Chan Tai Man avatar
How to recover ring settings for the slow and the middle rotors on Enigma Checking Machine?
il flag

Summary: The operation of the Enigma Bombe is well documented. I manage to use it and a candidate checking machine to recover the plugboard pairs and the ring setting for the fast rotor. I struggle to recover ring settings for the slow and the middle rotors.

Question: Where can I find out more technical details on the Checking Machine?

Dirk Rijmenants (2022) Enigma Cipher Machine Simulator operation ...

Score: 5
John dow avatar
Securely derive multiple EC keys from master EC key and prove it
pk flag

Alice has master EC key pair: $a$ - private key, $A$ - corresponding public key

Bob generates 2 random integers $r_1$ and $r_2$ and wants Alice to derive 2 new key pairs:

$a_1$ = $a$ + $r_1$ and $a_2$ = $a$ + $r_2$ and corresponding public keys $A_1$ and $A_2$

Questions:

  1. Is it possible for Alice to prove that she derived $A_1$ and $A_2$ from $a+r_1$ and $a+r_2$ using Schnorr proof?
  2. Is it secure for Alice ...
Score: 2
Lorenzo avatar
Implementing a Merkle tree using a 128 bit hash function?
ge flag

I need to implement a Merkle tree using a 128 bit hash function. In general, any hash function that guarantees pre-image, second pre-image and collission resistance should be fine to implement a Markle tree. Is it correct? Probably, it is not even necessary to have pre-image resistance as long as the other two properties are available. Indeed, if you use the Merkle tree for data integrity, you want it t ...

Score: 2
SeekingAnswers avatar
When using AES-256 in combination with HMAC-SHA, should we use SHA-256 or SHA-512?
gm flag

When using AES-256 (cipher mode CBC and padding mode PKCS7) in combination with HMAC-SHA for authenticated encryption (assuming alternatives like TLS and AES-GCM cannot be used), should we use SHA-256 or SHA-512? This answer seems to indicate SHA512. Is this interpretation correct? I've seen an implementation using SHA256 and cannot figure out, why.

Edit: Since it does not seem to be entirely clear: I'm  ...

Score: 2
Kira avatar
Mutual authorization using a pre-shared key
sz flag

I'd like for two machines on a network to be able to prove to each other that they both have knowledge of a pre-shared secret, without revealing the secret to each other. Let's assume that all traffic over the connection between the parties, A and B, is encrypted.

Here are the steps I'm currently imagining:

1. A->B: nonce_A, hash(nonce_A || secret_key)

  • B checks that they can produce the same hash u ...
Score: 0
mnaei avatar
How do different encryption schemes scale as a relation between their security parameter and computational requirement?
cn flag

For example is it harder to break one 256 bit encryption than two 255 bit encryption for RSA and AES?

For example, I understand that 256 bit RSA can be cracked in one minute according to this article [1] So would two independent 255 bit RSA message take thirty seconds each, and four 254 bit messages take 15 seconds each, etc... or would two 255 bit messages take 1 minute total on average?

[1] htt ...

Score: 0
atcheckmate avatar
Its Tls 1.2 Padding required when message ist multiple of block length?
za flag

When I want to encrypt a 16 byte long message with AES-128-CBC using int TLS 1.2 do I need to add a 16 byte block of padding or can I just encrypt the message without padding ?

Score: 2
Is the permuation check range in the PLONK Paper incorrect?
et flag

From the PLONK paper.

On pages 19 & 20, the paper describes the prescribed permutation check in PLONK.

enter image description here

---------------------------------------------

My question is about the Step 3 in the protocol which I have marked in red

I am interpreting $1 \le j < i$ as $j =1$ to $j = i-1$

So the $\prod$ equation becomes $Z(\mathbf{g}^i) = \prod_{j=1}^{j=i-1} f'(\mathbf{g}^j)/g'(\mathbf{g}^j)$

I think th ...

Score: 1
LUN avatar
Difference between "key_share" extension and "server_key_exchange" message in TLS 1.3
kw flag
LUN

Could anyone explain me the difference between "key_share" extension and "server_key_exchange" message in TLS (1.3) ? If I understood right, these "packets" of data are used to send a key material to generate premaster keys. But what's the difference ? In which case a server must use one or another

Score: 2
P_Gate avatar
Authenticated Key Exchange of Kyber.AKE
mq flag

I have some questions about the setting of the one-way authenticated key exchange of Kyber.AKE as defined in section 5 of the paper.

  1. How does $P_2$ authenticate itself to $P_1$? It is not obvious to me in the paper how it is ensured that $P_1$ really communicates with $P_2$. So how does $P_1$ know that it can actually trust $P_2$? I would have expected something like a certificate authority here.

     ...
Score: 5
user109190 avatar
How to prevent power analysis on software level?
nu flag

When attacking RSA with Square&Multiply, one can figure out the secret key by looking at the exponentiation algorithm itself. To prevent this in software, we could use dummy multiplications after each square.

Yet, there are attacks like correlation power analysis on AES, which is vulnerable to it by definition. How can such attacks be prevented on a software level, without using any noise mas ...

Score: 1
Ayumi80s avatar
Solve congruent equation likes N = p*q c1 = (2*p + 3*q)**e1 mod N c2 = (5*p + 7*q)**e2 mod N
ar flag

Here is a CTF crypto challenge likes(its write up is public on https://ctftime.org/writeup/15438): $$N = p*q\\ c1 = (2*p + 3*q)^{e_{1}} mod N\\ c2 = (5*p + 7*q)^{e_{2}} mod N$$ After i transform these: $$(c^{e_2}_1)\equiv (2p)^{e_1e_2}+(3q)^{e_1e_2}\pmod{N}\\ (c^{e_1}_2)\equiv (5p)^{e_1e_2}+(7q)^{e_1e_2}\pmod{N}$$ After product $5^{e_1e_2},2^{e_1e_2}$ to cancel p from two equations,I can solve this proble ...

Score: 1
Richard Thiessen avatar
Ensure deniability of an interactive zero knowledge proof
mx flag

Suppose that Peggy(prover) and Victor(verifier) are running some zero knowledge proof protocol that does not rely on hidden verifier secrets. The verifier generates randomly chosen challenge values only. Such protocols can be Fiat-Shamir transformed into NI(non-interactive)ZKPs.

There is significant work on NIZKPs. Using them as-is in contexts where deniability is necessary would be nice, but as- ...

Score: 1
ccc avatar
Constructing OR gate with OT
tv flag
ccc

I am constructing a two-party OR gate and trying to do this with oblivious transfer. Yet I am very new to oblivious transfer, wishing to know whether the following construction makes sense.

Goal: Alice inputs a random bit $a$, Bob inputs a random bit $b$, and Bob outputs the logical OR bit $a\oplus b$.

Construction via 1-out-of-2 OT: Alice inputs $m_0 = a, m_1 = 1$, Bob inputs $c = b$, and finally B ...

Score: 1
Join the party P.A.R.T.Y. avatar
Hash functions reversal
nc flag

How do we know that hash functions cannot be reversed? An example is often given of two primes and their product, but any composite number that is the product of two primes has, by definition, exactly 2 natural factors. In the case of hash functions, things are different.

Have there been attempts to reverse hash functions, and if so, how many have been successful? Are there any theoretical works  ...

Score: 2
RobinLinus avatar
Given two unrelated generators $G_1$ and $G_2$, and a third with $H = G_1 + G_2$. Is it hard to compute $xG_1$ from $xH$?
cn flag

Given some group in which both discrete logarithms and the computational Diffie-Hellman problem are hard. Furthermore, two random, unrelated group generators $G_1, G_2$, and a third generator defined by $H = G_1 + G_2$. Can you compute $xG_1$ if you know only $G_1$, $G_2$, and $xH$?

My guess: I would assume it's hard, because otherwise it would be easy to compute $xG$ knowing only $xH$ for any two unr ...

Score: 2
Quora93 avatar
Plain text attacks without decryption logic
fr flag

The CEO of the organization XYZ decides to hold a vote to decide whether employees should be allowed to work from home (WFH) either one, two or three days a week.

All 4 employees of XYZ (excluding the CEO), need to vote either “WFH one”, “WFH two” or “WFH three”. To ensure privacy, the CEO asks employees to send their votes by emailing them to the CEO. Furthermore, the CEO tells them  ...

Score: 2
Dimitri Koshelev avatar
Provably secure cryptography in blockchains
id flag

Do you know a blockchain that does not use at all cryptographic primitives standardized by USA or other countries? It is strange to me that the security of many cryptocurrencies is based on ciphers, hash functions, elliptic curves, etc. from American standards.

It is normal when a cryptographic product contains standardized primitives of a certain country to be sold in this country. However, cryp ...

Score: 1
Question about the PLONK permutation check
et flag

From the PLONK paper.

On pages 19 & 20, the paper describes the prescribed permutation check in PLONK.

enter image description here

In the last step of the proof, these are the checks

a) $L_1(a)(Z(a) - 1) = 0$
b) $Z(a)f'(a) = g'(a)Z(a \cdot g)$

In (a), I think checking $Z(a) - 1 = 0$ & doing the (b) check as written is enough. What purpose does multiplying this by the first Lagrange Polynomial ($L_1(a)$) serve?

Can  ...

Score: 2
Lee Seungwoo avatar
What is the space that exponents of ElGamal encryption scheme live?
ke flag

It is a bit stupid question, but I am so confused. Please examine my explanation. What is the space that exponents the generator $g$ of a cyclic group $G$ of prime order $p$?

I think it is $\mathbb{Z}_p$ since $|G|=p$, so that $G=\{g^0, g^1, \ldots, g^{p-1}\}$. Thus the space that the exponents live is $\mathbb{Z}_p$, which is a field.

But here is what I am confused. By Fermat's little theorem, $\f ...

Score: 2
Michael avatar
NaCL - should I keep track of expired nonces
br flag

I store the ciphertext and the nonce in a SQL database.

If I decrypt the ciphertext change it and encrypt it again I generate a new nonce, so that I do not encrypt two different plaintexts with the same nonce. After encrypting the updated plaintext I store the ciphertext and the new nonce back to the database.

My question is: Should I keep track of the expired nonces so that no other plaintext is ev ...

Score: -6
Luke Bright avatar
Are Schnorr's algorithm really subject to q-computer attacks?
pa flag

I was wondering whether quantum-computers really break Schnorr's signature scheme. Schor's algorithm works via the quantum Fourier transform, which reveals the cycle time and thus phi. However, with a multiplicative group mod $q$, a prime, everyone knows the cycle time, but that isn't the problem (unlike RSA). The problem is in finding a specific value.

Unlike in RSA, where you must FACTOR a number,  ...

Score: 0
Michael avatar
Is it safe to store AES-KW encrypted key in database?
br flag

Use Case:

Web application accessed in browser. Registered users can store personal notes in the application, these notes are stored in a SQL database on a online server. The user can store unencrypted notes and encrypted notes. For unencrypted notes the process is trivial, just store the notes in the database. For encrypted notes the storage gets complicated (for me).

Frameworks:

Score: 0
StavrosN avatar
Password Manager desktop app
sm flag

I have built a small password manager desktop app using python. This app falls under the master-password model.The app connects to two databases stored locally. The first database stores the users username for my app and the hashed (sha256+salt) master password it also stores an email for password recovery puprpose. The second database stores username,password and optionaly email for the app the user wa ...

The Stunning Power of Questions

Much of an executive’s workday is spent asking others for information—requesting status updates from a team leader, for example, or questioning a counterpart in a tense negotiation. Yet unlike professionals such as litigators, journalists, and doctors, who are taught how to ask questions as an essential part of their training, few executives think of questioning as a skill that can be honed—or consider how their own answers to questions could make conversations more productive.

That’s a missed opportunity. Questioning is a uniquely powerful tool for unlocking value in organizations: It spurs learning and the exchange of ideas, it fuels innovation and performance improvement, it builds rapport and trust among team members. And it can mitigate business risk by uncovering unforeseen pitfalls and hazards.

For some people, questioning comes easily. Their natural inquisitiveness, emotional intelligence, and ability to read people put the ideal question on the tip of their tongue. But most of us don’t ask enough questions, nor do we pose our inquiries in an optimal way.

The good news is that by asking questions, we naturally improve our emotional intelligence, which in turn makes us better questioners—a virtuous cycle. In this article, we draw on insights from behavioral science research to explore how the way we frame questions and choose to answer our counterparts can influence the outcome of conversations. We offer guidance for choosing the best type, tone, sequence, and framing of questions and for deciding what and how much information to share to reap the most benefit from our interactions, not just for ourselves but for our organizations.