Latest Crypto related questions

Score: 0
user37741 avatar
Combining WireGuard keys
jo flag

I suspect the answer is "no", but still:

In WireGuard [1], there's a concept of private and public keys for peers; public key derives from a private one and connection between two parties can be established only when keys match. Let's say we have two peers A and B. To connect them, they each have to:

  1. generate private key;
  2. generate public key using private one from previous step;
  3. share public key w ...
Score: 4
Large prime numbers in ECC and discrete logarithm
gb flag

In elliptic curve cryptography using Diffie-Hellman protocol, we need to use large prime numbers.

So my question is what makes discrete logarithm hard to solve when we use large prime numbers.

I guess since we use large prime numbers we will have a lot of points that satisfy our curve equation

Score: 2
eager2learn avatar
Using whitespace to break many-time-pad stream cipher
th flag

I have a question about the first programming assignment in Dan Boneh's cryptography course on Coursera. You're given 10 ciphertexts that were encrypted with the same key and you can presumably assume that the plaintext consists of letters and whitespace only.

The hint gives that you should consider what happens when a whitespace is xor-ed with a letter. The idea is to check whether the xor-ed su ...

Score: 1
Why use ASCII armor for file encryption?
nz flag

GPG and age both offer a --armor option but what is the use case when it comes to file encryption? Surely most channels allow for transmitting binary data nowadays? It seems unnecessary and sounds like it satisfies a rare use case.

I can understand it for sharing key pairs, maybe signatures, but not for file encryption. Even for key pairs and signatures, it feels like there are better ways of doing  ...

Score: 2
Nika Kurashvili avatar
How is it possible to derive the public exponent from an RSA private key?
es flag

I am gonna write down formulas that I know and use to generate RSA keys.

  1. we choose $p$, $q$
  2. $N = p\cdot q$
  3. $\varphi(n) = (p-1)\cdot(q-1)$
  4. choose $e$ such as
    • $1 < e < \varphi(N)$
    • $e$ is coprime with $N$, $\varphi(n)$
  5. choose $d$ so that $d\cdot e\bmod\varphi(n)=1$

That's it. With these, if we have $p=2$ and $q=7$, I successfully get $d=11$ and $e=5$ which is correct.

Now Imagine, that I only  ...

Score: 0
Mona avatar
Shamir secret sharing in automated verification tools
tr flag

Can Shamir secret sharing scheme (SSS) be verified using automated verification tools such as AVISPA? I read in the HLPSL manual that we cannot use arithmetic or relative operations such +,-,< ...etc in the HLPSL description of the protocol. Thus, we cannot implement LaGrange's interpolation formula?!! Do all protocol verification have this limitation?

(There are other protocol verification to ...

Score: -2
cdalxndr avatar
Bitcoin energy waste
th flag

Reading learnmeabitcoin I found the following how bitcoin works:

The bitcoin difficulty self adjusts so that a block is solved on average in 10 minutes.

Solving a block requires the miner to generate hashes until it reaches a certain valid hash (for example a value lower than a target). This means that the miner will use all available processing power to generate random hashes in hoping that it wil ...

Score: 1
Max avatar
ZK-SNARK basics: knowing t(x), what prevents the prover from creating random h(x) to forge L, R, and O
fr flag
Max

After reading a number of ZK-SNARK explainers from here, here, and here, I still don't understand a few things.

The setup of the algorithm uses QAP to calculate polynomial P(x) = L(x) * R(x) - O(x), as well as target divisor polynomial t(x), to represent the generic form of the target computation. Then, to create a proof, the prover

  • Calculates P(x) = L(x) * R(x) - O(x) for the specific parameters of the  ...
Score: 1
Sean avatar
Diffie-Hellman Assumption
yt flag

I'm wondering if the following problem is as hard as computational or decision Diffie-Hellman problem? (Or is it actually an easy problem because $c$ is available?)

Given a cyclic group $G$ and let its order be $q$. Given $g$, $q$, $g^a$ and $g^b$ and $c \in Z_q$, decide if $c \equiv a*b \mod q$.

Another version of the problem could be: let $G$ be a group of unknown order (e.g., where RSA or strong  ...

Score: 0
DBWeinstein avatar
When using prime factorization for key gen, is there a limit on the size of the prime factors?
it flag

If there is a limit, does that leave a limited number of prime numbers that can be used for key gen? And, if that is the case is the encryption system vulnerable?

Score: 1
siba36 avatar
test vectors for IDEA
us flag

I'm implementing IDEA algorithm in java and I need test vectors for the algorithm that include plaintext,ciphertext and keys in each step to verify my code.

Score: 2
Is using CFB in SIV secure?
cn flag

Is SIV mode variant equally secure, if you replace CTR mode encryption with full-block CFB mode encryption?

CFB seems to be safe with predictable IV: Is using a predictable IV with CFB mode safe or not?

But is it safe with Encrypt-and-MAC like construction as SIV?

Score: 0
Does matrix multiplication of hash digests admit manipulation of the result?
in flag

Take a sequence of byte buffers, hash each of them, interpret the hash digests as square matrices with 8-bit unsigned int elements, and (matrix) multiply them in order. Define the final matrix to be the "hash" of the list of elements.

This definition has some useful properties. In particular, the associative property of matrix multiplication enables calculating the list-hash of the concatenation  ...

Score: 0
One-time-pad Encryption in C
vn flag

I have been messing around with cryptography (for recreational use), and I created my own one-time-pad encryption script in C. Now, with that being said, I freely admit that I am by no means a cryptography expert. I know that Rule No. 1 of cryptography is not to do it yourself. However, I am genuinely interested in whether my encryption script is (theoretically) secure.

First, here is a basic deb ...

Score: 1
Pollard's p - 1 - how do you set the bound & how do you set the base numbers
et flag

In Pollard's p-1 algorithm for factoring N, you try to find a L such that p - 1 divides L. Then you check $gcd(pow(a,L,N)- 1, N)$. If 1 < gcd < N, then you have found one of the factors.

I have seen 2 methods to do this.

  1. For n from 1 to Bound, try $L = n!$ (i.e. factorial(n)) & try the $gcd(pow(a,L,N)- 1, N)$ for each one.
  2. for n from 1 to Bound, try $L = LCM(range(1,n))$ & try the

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.