Latest Crypto related questions

Score: 1
TheReal_Skywalker avatar
What are some ways to produce a pre-determined sequence of a large number of dice rolls?
ps flag

What are some ways to produce a pre-determined sequence of a large number of dice rolls (on the order of 100-1000 times) using biased dice or a biased human roller given the constraints that multiple dice (more than 2) have to be projected in one go from a height of at least 1 meter onto a transparent (acrylic/glass) platform? I'm looking for potential security concerns for a proposed method to gene ...

Score: 0
Ayden avatar
Is it necessary to verify the access token signature in the context of a TLS connection with .well-known endpoint?
pm flag

I'm developing a custom Authentication Socialite ADFS Provider using OpenID Connect: Authentication Flow.

Since I have a TLS connection between the client App and the Authentication server that issues the token, what is the point of verifying the access token signature? From my perspective, the connection is already authenticated with integrity.

The keys I would use to verify the signature are ex ...

Score: 1
miran80 avatar
Where in the TLS 1.3 record is the sequence number located?
kg flag

The sequence number should be a 64 bit number in every TLS record, but the record header layer is only 5 bytes long and I am looking at a Wireshark pcap, where the TLS record only includes the header and encrypted application data. There is no sequence number.

Score: 2
LUN avatar
Should a certificate message of a server be encypted in TLS 1.3?
kw flag
LUN

Section 2 of RFC 8446 says about the phase "Key Exchange": … Everything after this phase is encrypted.

The "Certificate" message is sent after "Key exchange" as the scheme in that section shows. So it seems to be encrypted.

I am confused that I haven't found a mention of certificate encrypting in the "Certificate" section 4.4.2.

Could you explain to me - Should the certificate be encrypted and (if i ...

Score: 2
LUN avatar
"Supported groups" in RFC 8446 (TLS 1.3)
kw flag
LUN

What is meant by "supported groups" in the section 4.2.7. "Supported Groups" of RFC 8446:
/* Finite Field Groups (DHE) */
ffdhe2048(0x0100), ffdhe3072(0x0101), etc:

Is the digits - 2048, 3072 (and groups) etc - are simply numbers of bits of the parameter p (module) in DF algorythm or something else ?

Score: 2
MariaDb avatar
Padding Oracle Attack Example
ax flag

I try to understand a oracle Padding Oracle Attack example. I try to solve this question but I didn't figure out the answer.

A 7-byte message is padded per PKCS#5 and encrypted using the CBC mode of operation. The resulting ciphertext is
0x07 06 05 04 03 02 01 01, 0x08 09 0A 0B 0C 0D 0E 0F

Assume an Attacker modified that to
0x07 06 05 04 03 02 00 02, 0x08 09 0A 0B 0C 0D 0E 0F
and observed that the ci ...

Score: 0
Simon Balfe avatar
Iterated hash functions
ir flag

enter image description here

In this image, It describes the basic idea of an iterative hash function. I am confused as to why the i value is set to be m+t+1 as default. Specifically, where does the 1 come from as m+t is just the arbitrary output size + t the message chunk size but the 1 im confused about

Score: 2
aryzing avatar
What is the relationship between NIST and secp256k1?
sm flag

While exploring secp256k1, I came across what seems like the official definition at https://www.secg.org/, specifically in https://www.secg.org/sec2-v2.pdf. In terms of authorship, the document only contains references to the Standards for Efficient Cryptography group and Certicom (acquired by Blackberry). However, many resources I come across mention "NIST curves" in the context of secp256k1.

I've  ...

Score: 3
PLONK: Why is the quotient polynomial multiplied by different powers of a challenge?
et flag

From the PLONK paper.

Page 29, Round 3

enter image description here

The paper doesn't explain the need or the use of the quotient challenge $\alpha$.

I understand why each of the polynomials is multiplied by $\frac {1}{Z_H}$ but don't understand why the second is also multiplied by $\alpha$ & the last by $\alpha^2$ - what purpose does the quotient challenge serve & why are different powers used? I can't find this discussed  ...

Score: 0
Xiangyu Zhang avatar
Two problem about noise management of BFV
gd flag

I have stuck in two problems when understanding the noise management of BFV scheme, and I don't have any idea about the two problem, help me please.

Problem 1:
In the Lemma 3 , the paper demonstrates that the norm of the noise after multiplying two ciphertexts $ct_0$ and $ct_1$ is $\left \|v_{mul}\right\|$=$E\cdot\delta_R\cdot(\delta_R+1.25)+E_{Relin}$, and I think the norm of $v_{mul}$ should be t ...

Score: 1
MariaDb avatar
Cryptography particular block length valid message
ax flag

I am new at cryptography and start to learn some terms. I just saw an question in the book and didn't got a clue about this question. Could someone can explain me the answer of this question? Because all of the questions seems to be fine for me.

Assuming the block length is 8 bytes (L = 8) Which of the following is/are are valid coded messages?

  1. 0x01 FF 52 18 04 04 04 04
  2. 0x01 FF 04 04 04 04 04 04 ...
Score: 0
miran80 avatar
Why is IV in RFC8448 examples only 12 octets instead of 16?
kg flag

I am working on manual decryption of application data in TLS 1.3 by going through example in RFC8448. I successfully derived and expanded key and IV, but the IV in examples is only 12 bytes long instead of 16, which is required for AES-128-GCM.

Score: 2
Luke Schlather avatar
Are passkeys actually hardware keys or are they just reversibly encrypted keys secured by a hardware key?
sc flag

Passkeys have this complicated QR code + Bluetooth dance to enroll a new device which seems like it ought to be securely creating a key on the device in a TPM.

However the messaging around "sync" seems to suggest that while that is happening, the device key is only used to encrypt a software key which is encrypted and synced to (Google, Amazon, Microsoft's) servers.

It seems like it would be more sec ...

Score: 1
DannyNiu avatar
Is it fatal if a blockcipher uses a sbox with a fixed point at 0?
vu flag

In a previous question, I asked how to implement arbitrary s-box in side-channel-free fashion. The code I posted in the question loops over all 256 values of a byte to avoid timing channel, and I want to change it to loop over the values of a word.

Before getting carried away and lost, I'm considering lazy-initializing the s-box table. Specifically:

  1. write byte-for-byte (i.e. 8-bit) sbox table.
  2. on the fi ...
Score: 1
Jeffrey avatar
Proving scalar multiplication given elliptic curve points
US flag

From this blog post: https://medium.com/@VitalikButerin/exploring-elliptic-curve-pairings-c73c1864e627

if P = G * p, Q = G * q and R = G * r, you can check whether or not p * q = r, having just P, Q and R as inputs.

How?

It's easy to see p * Q = q * P = R. But I don't see the leap to proving p * q = r.

Score: 7
user109261 avatar
Generating suitable prime numbers for Paillier key pair in GG18
xk flag

I am working on MPCs (multi party computation) in crypto, and now I am developing a implementation of GG 18.

In sign phase, algorithm needs MtA (Multiplicative to Additive) and uses a Paillier key pair for this.

Paillier uses modulus $N$ ($N=p_1 * p_2$†, prime numbers drawn at key generation). But we need to consider the order $q$ of the elliptic curve. spec256k1 for example, so the algorithm has ...

Score: 2
Rory avatar
Where does the 8 come from? Generic Search Problem with Bounded Probabilities
mp flag

I am working with lossy ID-schemes and their security in the QROM. Following the article of Kiltz et al. , I am at a loss of the number 8 appearing in most reductions throughout the article. I know it comes from the Generic Search Problem for Bounded Probabilites, however how?

The Lemma from the article as wee as the game for a quantum adversary is:

enter image description here

With the following proof in the appendix:

enter image description here enter image description here

Any and al ...

Score: 1
Cat Dragon avatar
Example of S-Box truth table in AES
it flag

I'm trying to understand some cryptographic properties of the s-box so I can have my own code. Example of balanced properties I read in this document that they say

A boolean function S : $ GF(2^n) $ $ \to $ $ GF(2) $ is called balanced if the output set contains equal number of ones and zeros in the corresponding truth table.

Example 2.2.3 We provide a comparison of balanced and unbalanced functions. Co ...

Score: 3
What does preprocessed polynomial mean in the context of PLONK?
et flag

The PLONK paper uses the term preprocessed polynomial a lot of times.

  • For e.g. page 14

The protocol definition includes a set of preprocessed polynomials $g1, . . . , g_l \in F<d[X]$

  • Page 20

Preprocessed polynomials: The polynomial $S_{ID} \in F<n[X]$ defined by $S_{ID}(\mathbf g^i) = i$ for each $i \in [n]$ and $S_\sigma \in F<n[X]$ defined by $S\sigma (\mathbf g^i) = \sigma(i)$ f ...

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 ...

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.