Latest Crypto related questions

Score: 1
kelalaka avatar
Using Shor's algorithm to access RSA messages without factoring
in flag

Most of the time people forgot that the real aim of the adversary against encryption is accessing the message. For example, in the RSA case, we talk about the factoring of the modulus to reach the private key to reveal the encrypted messages. If proper encryption is not used then instead of factoring one can try the possible message space or the cube-root attack.

In the RSA case, if ever a real s ...

Score: 0
Néstor Llop avatar
How can a cryptographic algorithm be vulnerable?
in flag

I was looking for an encryption algorithm to use with my 7zip archives and I read that there is a solution called ZipCrypto that was said to be very vulnerable.

Since I'd suppose these type of vulnerabilities aren't of the kind of those found in an Application Security context (heap-based, stack-based...) and given that I don't know a lot about these kind of algorithms, how can a cryptographic so ...

Score: 3
Mabadai avatar
Given $φ(n)$ how can we find any combinations for $p, q$ prime numbers
jp flag

Suppose i already have found that $φ(n) = 240$ for $n = 900$. How can i conclude that my $n = pq$ is of type $2^2\cdot3^2\cdot5^2$? What is $q$ and what is $p$ here?

To be more precise with my question: is it for all $n \in \Bbb N$ with only known $φ(n)$ , can i find the disassembly of $n$ to prime factors?

Edit(The calculation that i have done so far):

$φ(n) = (p - 1)(q - 1)$

$240 = pq - (p + ...

Score: 0
Help determine points on P-256 lie on the actual curve
gb flag

The curve equation for P-256 is:

NIST P-256

y^2 = x^3-3x+41058363725152142129326129780047268409114441015993725554835256314039467401291

Below I am generating key data, including the secret key "d".

Can someone please help me:

1-Convert and plug in the 2 points below into the above equation to ensure the points lie on the curve.

2-Show me, using the curve equation above, how I can determine that x+y wil ...

Score: 0
João Víctor Melo avatar
Perfect Secrecy for Shift Cipher
au flag

I've read the definition of perfect secrecy as the following:

A cryptosystem has perfect secrecy if $\Pr(x | y) = \Pr(x)$, for all $x \in P$ and $y \in C$, where $P,C$ are respectively the set of plaintexts and ciphertexts.

Now suppose there are 26 keys in the Shift Cipher (SC) with probability 1/26. Then for any plaintext with probability distribution, SC has perfect secrecy.

The proof starts with:

Score: 1
eddydee123 avatar
How to compose (H)KDF, Encryption and (H)MAC
mk flag

For legacy reasons one of my systems doesn't have the option of using an AEAD mode, we are restricted to AES in plain CBC or CTR mode plus a MAC.

A typical task is to transfer data from one node to another while guaranteeing integrity and confidentiality. I find myself repeatedly specifying the following composition:

  • CSPRNG to generate a bootstrap secret
  • KDF to derive keys for encryption and MAC - I use  ...
Score: 2
deb avatar
Add a non-signer to an already-signed message
cn flag
deb

This is a follow-up to the first comment of this answer.

A message is signed with the private key of $A$, $s_A$. We know $p_B$, the public key of $B$, but not $s_B$, their private key. Is it possible, using neither secret key, to create a ring signature that has $A$ as the signer and $B$ as a non-signer?

I've quickly run through the math behind ring signatures (and understood half of it), and it look ...

Score: 1
xChaCha20 Block Keys for Poly1305
cn flag

So xChaCha20 has a nonce size large enough to safely use a random nonce with the same key. Poly1305 generally uses the first block of the cipher's output to generate its nonce. For xChaCha20 it would be the block zero for poly1305 key/nonce and the rest of the data would be encrypted with block 1 and up. So if one were to send a message you would get something along these lines (order may be different d ...

Score: 3
Makky 56 avatar
How secure is it to share "Passwords" using Shamir Secret Sharing given a way to verify if password is correct?
us flag

Lets say you have a order $n$ finite field which you are using to create $k$ shares for a password using Shamir Secret Sharing. Assume that the attacker gets $k-1$ shares.

Is it possible that the attacker can do brute force and find the password given that there is a way to check if a guessed password is correct or not (like using a login on a website multiple times till you get in)?

Does the order

Score: 1
David J. avatar
Which cryptographic tool can be used to prove that a program passes a certain test?
ru flag

Let's say I have a smart contract located at an address A, and another smart contract that runs tests on A located at A'. A may contain a reference to this test contract and have a function like runTests that runs A' using the bytecode of A.

My question is: is there a way to prove that A passed the test, so that the test need not be run again? I mean, suppose A stores a variable called passedTest

Score: 7
jinscoe123 avatar
Find Elliptic Curve Parameters, a and b, Given Two Points on the Curve
th flag

I am new to Elliptic Curve Cryptography and am working on a CTF challenge that uses Elliptic Curves. Currently, I am trying to find the generator, $G$, and am given the public and private keys, $P$ and $k$, s.t. $P = [k]G$, as well as one other random point on the curve. I know the order, $n$, of the group, and I know the two prime numbers, $p$ and $q$, which are the sole factors of $n$.

I read tha ...

Score: 2
Foobar avatar
Calculating statistical distance for simple addition cipher?
fr flag

I'm looking at the solutions to this problem set for self study.

One of the questions is to calculate the statistical distance for the following scheme:

enter image description here

  • The message space is equal to the key space, which is all positive integers $\leq 2^\lambda$
  • Encryption/decryption is just addition & subtraction

and statistical distance is defined as:

enter image description here

The solution for calculating the statistical distance  ...

Score: 4
automatictester avatar
Java: SecureRandom.getInstanceStrong() vs new SecureRandom()
ht flag

Given SecureRandom class is considered suitable for use in cryptography, I consider new SecureRandom() to be secure (funny term, isn't it?).

If new SecureRandom() already is secure, what would be the benefit of using SecureRandom.getInstanceStrong() instead?

Is this same kind of difference as between /dev/urandom and /dev/random?

I'm debating this in the following scenario, where I'm mostly concerned abo ...

Score: 2
deb avatar
How to exchange a credential whilst ensuring deniable authentification?
cn flag
deb

This is a follow-up to this answer. The context & vocabulary used is that of a decentralized identity system.

Let $I$ be the issuer of a credential, $H$ the holder and $V$ the verifier. In this setting, $I$ signs a credential $C$ with their private key, and hands it over to $H$ for storage, who may then present it to $V$ to prove their identity.

One flaw remains in this system: if such were the i ...

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.