Latest Crypto related questions

Score: 1
killalad avatar
HKDF with predefined IV
fr flag

Can I generate from a randomly generated key let say three other keys via HKDF with predefined IVs, eg. Sha-256 of "apple", "banana", "pear"?

My use-case is an app that at the beginning generates one key from which is created every other key using HKDF for each individual DB and the IV for each generation is an SHA-256 of the DB's name. So every app has a different master key but the IVs for DBs  ...

Score: 1
X. G. avatar
Why a simulator can obtain a corrupted party's input to some subrountine ideal functionality $F$ "for free" in $F$-hybrid model?
in flag

In "How To Simulate It" (page 45, line 10), Lindell noted that, in the $f_{\textsf{zk}}$-hybrid model (where $f_{\textsf{zk}}$ denotes the ideal zero-knowledge functionality) in the stand-alone model,

if the adversary controls the party running the prover, then it directly sends the input and witness pair $(x, w)$ to $f_{\textsf{zk}}$. This means that a simulator who internally runs the adversary wi ...

Score: 0
Fikret Basic avatar
Designing a CRAM protocol for mutual authentication in constrained devices
us flag

We are currently designing a simple Challenge-Response Authentication Mechanism (CRAM) protocol based on symmetric cryptography that would be used on the constrained embedded devices that would operate in a closed short-range network.

Mutual authentication is desired. The security capabilities offered by the devices are for now unknown. Hence, we are focusing primarily on only using the AES proto ...

Score: 1
Geonhee Cho avatar
Is there any “approximate or probabilistic” password authentication method?
us flag

I understand that the password-based authorization check procedure requires that you enter a password that is correct, that is, does not allow even a single bit difference.

Suddenly I have this thought.


[System A] For password-based authorization system A, let's assume that the password is 256bit.

And it always asks for the correct password for permission verification.

The probability of successful autho ...

Score: 3
Kostas Kryptos avatar
Asymmetric encryption scheme with the shortest output for encrypting 1 byte of information
cn flag

Imagine that one needs to periodically encrypt very short messages (i.e., a boolean Yes/No, a single byte, or 3-4 bytes in the worst case). We assume that there is no session, and we just need to encrypt under a receiver's public key (i.e., posting an encrypted byte to the blockchain).

I'm aware of ElGamal, Cramer-Shoup, RSA, ECIES encryption etc. and I'm looking for the algorithm with the shorte ...

Score: 1
akez avatar
Does Salsa20/ChaCha20 still provide Integrity when Encrypt Bitmap?
in flag

Forgive me for this question. I have an idea to encrypt *.bmp bitmap files using ChaCha20/Salsa20 without Poly1305.

This is just a simple program, where I can encrypt *.bmp bitmap images, with the resulting CipherText in the form of *.bmp files that can still be opened and display random pixels that have been encrypted. The image illustration is below:

Illustration

  1. Is this this possible?
  2. If so, does Ciphertext  ...
Score: 0
Moldender avatar
My fernet key "expired" what now?
us flag

6 months ago i created a bot that basically stored every users data in json format in different text files and i had a fernet key. I basically didn't touched it for like 2 months now, because it's a bot for students. So here is the thing, school starts is 15 days, i have 106 accounts which are encrypted using a single fernet key and i can't decode any files because it says that it's corrupted. What can  ...

Score: 6
GunJack avatar
Why is mod calculation necessary in a one time pad encryption?
de flag

Considering the English alphabets to be encrypted why is the computation of mod 26 necessary after adding the pad to plain text. Is it just that it adds to another level of encryption or is it used so that two letters may end up with the same symbol in the cypher? 3 mod 26 is 3 and 29 mod 26 is 3.

Score: 0
The amateur programmer avatar
Where can I find test vectors for ChaCha20 (trying to understand Wikipedia example)?
cn flag

I was playing around with stream ciphers an found this Wikipedia ChaCha20 page (the ChaCha variant). What I'm lost with is how to test this code. There are no testvectors anywhere on that page and I cannot find any. I wrote the following C code:

#define ROTL(a,b) (((a) << (b)) | ((a) >> (32 - (b))))
#define QR(a, b, c, d) (            \
    a += b,  d ^= a,  d = ROTL(d,16),   \
    c += d,  b ...
Score: 0
J.Doe avatar
A query regarding SHA256 Algorithm
br flag

I am trying to code SHA256 from scratch to understand its implementation based on the wiki pseudo code as its clear enough. But I am running into problems with the calculation of W[i] for the first block. I am sure I am missing the logic somewhere. Given a data string of size 80 Bytes (in Hex): "02000000aaf8ab82362344f49083ee4edef795362cf135293564c4070000000000000000c009bb6222e9bc4cdb8f26b2e8a2f8d16350969 ...

Score: 2
Oscar avatar
Can future time-based keys be deduced from a previous key?
in flag

If a time-based key generated by an authenticator app like Google Authenticator is compromised, can future keys be deduced from the compromised key?

Score: 1
Sentinel ("trick") values for lattice attack on DSA with biased k (MSB)
in flag

I'm studying lattice attack using this sage script. There are 2 options in script: LSB and MSB. The most interesting option for me is MSB. It recovers private key with less then 100 signatures provided with script. When I run it with my PQG generated by openssl and my own signatures with zeroed 8-bit MSB I was able to recover private key with 800 signatures in one case and unable to recover even wi ...

Score: 2
Verifiable execution of a program
si flag

I would like to know what cryptographic primitives could be used for Alice to prove to Bob that she actually executed a program. The goal is to make a Proof-of-useful work, where Alice proves she verified a transaction, but where this proof is tied to Alice's public key. Creating the proof needs to be only possible by executing the program. Verifying the proof should be much faster using the public key  ...

Score: 4
common2k avatar
In quantum cryptography, why can a qubit can be both 0 and 1 at the same?
pt flag

The texts below are from some tutorial, and it says (in bold format below) a qubit can be both 0 and 1 at the same time. It sounds very strange to me, can you please explain why?

Quantum cryptography utilises the physics of photons (light energy according to the formula E = hf) and their physical quantum properties to produce a virtually unbreakable encryption system. This helps protect the security of  ...

Score: 2
LeonMSH avatar
ECC Point Addition on Jacob coordinate -- Not Commutative?
us flag

I have a python script that does the ECC point addition (code paste below), it simply performs the P =Q1+Q2 on Jacob coordination. However, when doing some regression tests, I found that if I exchange the P1 and P2 positions, I will get different results, one of which is correct. Below is an example that simply using secp256k1 G point as one point, and 2*G as the 2nd point to run the test.

My que ...

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.