instruction stringlengths 15 30k |
|---|
You can get the 2nd equation from the first with some simple algebra.
$$(p-1)(q-1)$$
$$pq-p-q+1$$
$$n-p-q+1$$
I'm not really sure what you are asking though. Are you asking if computing the second is faster than the first?
I suppose you could argue that you have to do the $pq$ multiplication anyways, so why ... |
You can get the 2nd equation from the first with some simple algebra.
$$(p-1)(q-1)$$
$$pq-p-q+1$$
$$n-p-q+1$$
I'm not really sure what you are asking though. Are you asking if computing the second is faster than the first?
I suppose you could argue that you have to do the $pq$ multiplication anyways, so why ... |
From wikipedia, the DDH assumption says,given a cyclic group $G$ of order $q$ with generator $g$, $(g^a, g^b, g^{ab})$ looks like $(g^a, g^b, g^c)$ where $a,b,c$ are randomly and independently chosen from $\mathbb{Z}_q$.
Then what I wonder is, whether $(a,(g^a)^b )$ looks like $(a, g^c)$, where $a,b,c$ are randomly ... |
Is $(a,g^{ab})$ is computationally indistinguishable from $(a, g^c)$? |
From wikipedia, the DDH assumption says,given a cyclic group $G$ of order $q$ with generator $g$, $(g^a, g^b, g^{ab})$ looks like $(g^a, g^b, g^c)$ where $a,b,c$ are randomly and independently chosen from $\mathbb{Z}_q$.
Then what I wonder is, whether $(a,(g^a)^b )$ looks like $(a, g^c)$, where $a,b,c$ are randomly ... |
No, not really. The problem is that these kind of parameters may themselves be chosen deliberately. In other words, NIST/NSA may have performed a pre-calculation to make sure that the key stretching outputs a value that opens the algorithm up to some kind of attack.
Lets take an example, would you trust: `SHA-256^2^... |
I know hill chipher is a block chipher ,We produce decryption key by inverse of key matirx but we still use different key for decryption. Therefore Can we say that Hill chipher is asymmetric chipher? |
Can Hill Chipher be considered as Asymmetric? |
One security issue of original convergent encryption is, it is vulnerable to off-line brute force attack. If the adversary knows the entire message space, it can sample each message, computes the hash, encrypts with the computed hash (key) and compares the ciphertext of sampled message with the target ciphertext. If bo... |
I need to know:
1- What does exactly correctness mean in this context?
2- How is correctness implied in malicious model?
3- If the correctness means " the adversary cannot cause the output to be incorrectly distributed"[1] then it can change the computation result with the correct distribution.
-----------... |
Without having any knowledge of common encryption methods, I wonder if an encrypted text can look like random valid words as if it is a sentence. Is it possible? If so, what methods should I use? |
Is it possible to make an encrypted text look like a sentence consists of random words? |
While practising on paper I've realized of a property of multiplicative group of integers **mod** $n$.
First, let's define $G$ being $p$ a prime and $g$ a primitive root mod n or a generator of a subgroup of $p$ whose order is a factor of $|G|$.
**Example:**
$p=23$
$|G|=p-1=22$
Then find a valid $g$ whos... |
I have an application that I use sha3-512 to hash my password with a randomly generated 64 characters salt for each password. Is it bad to use this method to store passwords? I know many people reference using bcrypt for password storage. What are the advantages/disadvantages of using bcrypt vs. a hash/salt combo? |
The following highlighted text must contains `547a5e0e008be33730158d63ce844e67` data. I don't know about encryption method and key.
Is it possible to decrypt it?
![Screenshot of hexdump][1]
[1]: https://i.stack.imgur.com/yulXL.png
Or just give me some idea about encryption method that they use to encryp... |
> Is it bad to use this method to store passwords?
**Yes. It is bad.**<br>
Why?
1. It's bad because you're rolling your own crypto, which is generally considered a bad choice.
2. It's bad because SHA-3 is *slow* in software (e.g. on servers and consumer PCs) and *fast* in hardware (e.g. FPGAs, ASICs) and henc... |
A quick question, we know that raw RSA is a no go. To solve this we have different PKCS standards forcing structure on the input messages.
For EC the story is something else. For signatures we have ECDSA, for general encryption we have ECIES (hybrid) and ElGamal encryption. Or ECDH for key agreement
None of those... |
Which attacks are possible against raw/textbook elliptic curve? |
I am writing an app that needs to split a stream of plaintext bytes into variable-sized chunks (for deduplication). The way this is traditionally done is using a rolling hash function defined over some window `w` (eg. 48 bytes). This window "slides" along the byte stream and is evaluated at each byte position, and when... |
Consider the case that
$c = a \cdot b \mod p$
where $p$ is a known prime and $0 < a < p$ and $0 < b < p$ are unknown integers numbers
But, some bits on the value of $c$ are known...
With this information can anynone learn some bits of $a$ ?
The question is based on the following non-modular example.
B... |
How information is disclosured in a modular multiplication? |
Consider the case that
$c = a \cdot b \mod p$
where $p$ is a known prime and $0 < a < p$ and $0 < b < p$ are unknown integers numbers. Furthermore, some bits on the value of $c$ are known.
Q1: Can an attacker learn some bits of $a$ using this information?
The question is based on the following non-modular e... |
How is information disclosed by modular multiplication? |
> Can an attacker learn some bits of a using this information?
No. In the case of multiplication modulo a prime, we have, for any possible value of $a$, there is a unique value of $b$ that makes $a \cdot b \bmod p$ give any particular value of $c$ in the range $(1, p-1)$.
That is, even if we knew all the bits of... |
I dont see the immediate risk of using the hash of the key as the nonce for AES PGM. Is there something I'm overlooking? |
Is it ok to use a hash of the key for aes gpm nonce? |
> Can an attacker learn some bits of a using this information?
No. In the case of multiplication modulo a prime, we have, for any possible value of $a$, there is a unique value of $b$ that makes $a \cdot b \bmod p$ give any particular value of $c$ in the range $(1, p-1)$.
That is, even if we knew all the bits of... |
If you are brute forcing a key and trying trillions of combos, how will you know when you accidentally hit the right answer? Clearly you can't look at each decoded answer to see which "looks right". |
Random oracles don't exist, but aren't PRFs essentially indistinguishable from them? So why can't we substitute pseudorandom functions wherever we use random oracles?
And if we can do this, why is there any controversy over substituting hash functions for random oracles, when we can instead use pseudorandom function... |
Is it OK to substitute a PRF for a random oracle? |
Yes, when we're instantiating some crypto primitive that says 'insert Random Oracle here', we will in practice insert a PRF.
Now, you ask, why is that even slightly controversal? Well, there are known constructions that are secure with a Random Oracle, but not secure with any specific PRF, see [this paper][1] for a... |
The first indication that something is wrong with MD5 was found in 1994; it was then broken completely more than a decade later. That's more than a decade of warning.
But how can we be sure that the amount of time between first realizing that a scheme may be broken at some future date, and the time at which it's fat... |
How do we know it won't all fail suddenly? |
The first indication that something is wrong with MD5 was found in 1994; it was then sufficiently broken more than a decade later. That's more than a decade of warning.
But how can we be sure that the amount of time between first realizing that a scheme may be broken at some future date, and the time at which it's f... |
I am writing an app that needs to split a stream of plaintext bytes into variable-sized chunks (for deduplication). The way this is traditionally done is using a rolling hash function defined over some window `w` (eg. 48 bytes). This window "slides" along the byte stream and is evaluated at each byte position, and when... |
Is it possible to encrypt a message's destination as well as its content? |
If you have the cyclic group of integers modulo $p$, where $p$ is not a safe prime, as well as a generator $g$ with which for all factors $q$ of $(p-1)$,
$g^{(p-1)/q} \ne 1$,
[This answer](http://crypto.stackexchange.com/a/9011/24627) says that given $g$ and $g^x \bmod p$, we can determine $x \bmod q$ in $O(\sqrt... |
The equation for the elliptic curve is $y^{2} = x^{3} + x$ and is defined over the field $F_{q}$ for some prime $q=3 mod 4$, and set $q=307$. Choose random generator $g=[182, 240]$. My question is that how do I construct a bilinear map e and compute $g_{1} = e(g, g)$? |
Is it right about an example of bilinear map e? |
We don't ever *know,* in the information theory sense, that a crypto algorithm wont fail suddenly. If we ever knew that, we'd quit using it. However, it has been shown that crypto algorithm failing has a strong tendency to fail according to a two step process:
* Most crypto algorithms fail quickly in the initial ... |
The equation for the elliptic curve is $y^{2} = x^{3} + x$ and is defined over the field $F_{q}$ for some prime $q\equiv 3 \pmod 4$, and set $q=307$. Choose random generator $g=[182, 240]$. My question is that how do I construct a bilinear map $e$ and compute $g_{1} = e(g, g)$? |
Is it right about an example of bilinear map $e$? |
It took more than a decade from when MD5 looked like it was going to break to the point when it was actually broken. That's more than a decade of warning. How can we be sure that when our cryptosystems are flawed, we'll have enough warning time to change them?
How can we be sure, say, that ECC won't get broken overnig... |
It took more than a decade from when MD5 looked like it was going to break to the point when it was actually broken. That's more than a decade of warning.
How can we be sure that when our cryptosystems are flawed, we'll have enough warning time to change them?
How can we be sure that, say, ECC won't get broken ov... |
How do we know a cryptographic primitive won't fail suddenly? |
The tag wiki for [tag:sha-256] says, in part:
> SHA-256 ... processes the input in 512-bit block and has a 256-bit output, for a 128-bit security level.
I'm not a cryptographer, just an interested amateur, but **how does it follow that SHA-256 has only a 128-bit security level?** (More generally about the whole S... |
What makes SHA-2 and SHA-3 have security levels half their output hash length? |
I have quite a big problem, because of a software implementation of TLS I had to adapt I had to create something which is now biting me.
It all comes down to this: I need to know the lenght of the plaintext when i want to decrypt it and the lenght of the ciphertext when i want to encrypt it. For the 2nd one I've mad... |
The simple answer is nobody can prove that an algorithm won't break in a given period of time. Of course proving most things are impossible. Prove to me you won't die in the next 24 hours. It may be unlikely, you may take steps to ensure it doesn't happen, but you can't prove it won't.
There are a couple of guidel... |
The simple answer is nobody can prove that an algorithm won't break in a given period of time. Of course proving most things are impossible. Prove to me you won't die in the next 24 hours. It may be unlikely, you may take steps to ensure it doesn't happen, but you can't prove it won't.
There are a couple of guidel... |
It took more than a decade from when MD5 looked like it was going to break to the point when it was actually broken. That's more than a decade of warning.
How can we be sure that when our cryptosystems are flawed, we'll have enough warning time to change them?
How can we be sure that, say, ECC won't get broken ov... |
It took more than a decade from when MD5 looked like it was going to break to the point when it was actually broken. That's more than a decade of warning.
How can we be sure that when our cryptosystems are flawed, we'll have enough warning time to change them?
How can we be sure that, say, ECC won't get broken ov... |
**The simple answer is nobody can prove that an algorithm won't break in a given period of time.**
So the goal is to increase the probability that there will not be an effective attack on the algorithm in a given period of time. There are a couple of characteristics which increase the probability that a particular... |
I was reading "The FFX Mode of Operation for Format-Preserving Encryption" when I came across Figure 1 (see below). It's obvious why it's reversible (top-down then down-top) but it's not clear **why it should strictly be bijective instead of injective or surjective?** What rules out the possibilities of collisions (sur... |
Why is a feistal network bijective? |
What's the inverse function of this decryption function? |
I was reading "The FFX Mode of Operation for Format-Preserving Encryption" when I came across Figure 1 (see below). It's obvious why it's reversible (top-down then down-top) but it's not clear **why it should strictly be bijective instead of injective or surjective?** What rules out the possibilities of collisions (sur... |
Why is a Feistel network bijective? |
I was reading "The FFX Mode of Operation for Format-Preserving Encryption" when I came across Figure 1 (see below). It's obvious why it's reversible (top-down then down-top) but it's not clear **why it should strictly be bijective instead of injective or surjective?** What rules out the possibilities of collisions (sur... |
**The simple answer is nobody can prove that an algorithm won't break in a given period of time.**
So the goal is to increase the probability that there will not be an effective attack on the algorithm in a given period of time. There are a couple of characteristics which increase the probability that a particular... |
> why it should strictly be bijective instead of injective or surjective?
Actually, it is injective and it is surjective; the term bijective just means that it satisfies both the properties of injectivity and surjectivity.
Injective does not mean that there is a 'skip' (that's "not surjective"); instead, it state... |
Well your question is based on an incorrect assumption. You can't say SHA-2 has a security level of half its hash length without any given context. **128 bit against what type of attack?** What is the attacker trying to do.
Any algorithm is considered 128 bit strength if the average number of operations to find a... |
Well your question is based on an incorrect assumption. You can't say SHA-2 has a security level of half its hash length without any given context. **128 bit against what type of attack?** What is the attacker trying to do.
Any algorithm is considered 128 bit strength if the average number of operations to find a... |
EDIT: Fixed for clarity of intention
I was reading "[The FFX Mode of Operation for Format-Preserving Encryption][1]" when I came across Figure 1 (see below). It's obvious why it's reversible (top-down then down-top) but it's not clear **why it should strictly be bijective instead of not-injective or not-surjective?*... |
EDIT: Fixed for clarity of intention
I was reading "[The FFX Mode of Operation for Format-Preserving Encryption][1]" when I came across Figure 1 (see below). It's obvious why it's reversible (top-down then down-top) but it's not clear **why it should strictly be bijective instead of not-injective or not-surjective?*... |
Well your question is based on an incorrect assumption. You can't say SHA-2 has a security level of half its hash length without a given context. **128 bit against what type of attack?** What is the attacker trying to do.
A algorithm is said to have 'n bit strength' if the average case number of operations to a s... |
Well your question is based on an incorrect assumption. You can't say SHA-2 has a security level of half its hash length without providing a context. **128 bit strength against what type of attack?** What is the attacker trying to do?
A algorithm is said to have 'n bit strength' if the average case number of oper... |
**The simple answer is nobody can prove that an algorithm won't break in a given period of time.** The achievable goal is increase the probability that no effective attack will be developed without warning. There are a couple of characteristics which increase the probability that a particular cipher will remain secur... |
You can't say SHA-2 has a security level of half its hash length without any given context. **128 bit against what type of attack?** What is the attacker trying to do? Perform a collision? Ok yes it has 128 bit against collisions. Perform a preimage? Nope it has 256 bit security against preimage attacks.
Any al... |
Occasionally I hear people say that one-time pads are "useless" or even "broken".
> "modern cryptography knows more security definitions, under some of
> which the one-time pad is completely broken."
> -- http://crypto.stackexchange.com/questions/26094/how-do-we-know-a-cryptographic-primitive-wont-fail-suddenly
... |
Has the one-time pad been broken? |
Occasionally I hear people say that one-time pads are "useless" or even "broken".
> "modern cryptography knows more security definitions, under some of
> which the one-time pad is completely broken."
> -- http://crypto.stackexchange.com/questions/26094/how-do-we-know-a-cryptographic-primitive-wont-fail-suddenly
... |
So I am curious about the security analysis of **`Marvin32`**, the randomized hash algorithm used in .NET (to prevent hash-table DoS). I found the source code here: [marvin32.h](https://github.com/dotnet/coreclr/blob/master/src/inc/marvin32.h), [marvin32.c](https://github.com/dotnet/coreclr/blob/master/src/vm/marvin32.... |
I just have gotten into cryptography and learned about the Vigenere block. I think it's a very good idea because, if used correctly, it is unbreakable. But the only downsite is, the key must be the same length as the message. Well, can't you just simply make the block 27x27 big by adding the space into it. That way you... |
Will adding space to the Vigenere block make it truly unbreakable? |
A block cipher in counter mode creates a keystream by
$$z_0 = IV$$
$$z_i = E_K(z_{i-1})$$
Where $IV$ is some chosen (n-bit) initialisation vector. The keystream is then $z_0 || z_1 || z_2 || \cdot \cdot \cdot$
How can we distinguish between such a keysteam and a truly random bit sequence?
|
Is $(a,g^{ab})$ computationally indistinguishable from $(a, g^c)$? |
A block cipher in creates a key stream by:
$$z_0 = IV$$
$$z_i = E_K(z_{i-1})$$
Where $IV$ is some chosen (n-bit) initialisation vector. The keystream is then $z_0 || z_1 || z_2 || \cdot \cdot \cdot$
How can we distinguish between such a key stream and a truly random bit sequence?
|
A block cipher in counter mode creates a key stream by:
$$z_i = E_K(IV || i)$$
Where $IV$ is some chosen initialisation vector (with some length $l$ less that $n$ bits) and $i$ is the binary representation of the number $i$ in $n-l$ bits. The keystream is then $z_0 || z_1 || z_2 || \cdot \cdot \cdot$
How can w... |
What is the SHA-256 hash of the number 0? (Not the hash of the ASCII number code corresponding to the character "0".)
In other words: What is the SHA-256 hash if the input is null? |
SHA-256 hash of number 0 (or null input)? |
What is the SHA-256 hash if the input is null? (Not the hash of 0 or "0".) |
SHA-256 hash of null input? |
Does the one-time-pad meet modern security definitions? |
Recently many attacks were discovered on AES that claim to have
- The first key recovery attack on the full AES-128 with computational
complexity 2^126.1
- The first key recovery attack on the full AES-192 with computational complexity 2^189.7
- The first key recovery attack on the full AES-256 with computa... |
Recently many attacks were discovered on AES that claim to have
- The first key recovery attack on the full AES-128 with computational
complexity $2^{126.1}$
- The first key recovery attack on the full AES-192 with computational complexity $2^{189.7}$
- The first key recovery attack on the full AES-256 with... |
What is meant by - computational complexity $2^x$? |
Recently many attacks were discovered on AES that claim to have
- The first key recovery attack on the full AES-128 with computational
complexity $2^{126.1}$
- The first key recovery attack on the full AES-192 with computational complexity $2^{189.7}$
- The first key recovery attack on the full AES-256 with... |
A block cipher in counter mode creates a key stream by:
$$z_i = E_K(IV || i)$$
Where $IV$ is some chosen initialisation vector (with some length $l$ less that $n$ bits) and $i$ is the binary representation of the number $i$ in $n-l$ bits. The keystream is then $z_1 || z_2 || z_3 || \cdot \cdot \cdot$
How can w... |
The "many attacks" you're referring to, don't exist.<br>
There are two main attacks on AES. One needs related keys and drops security level signifantly (to about the half of the bits).<br>
You're referring to the other one, the [biclique attack on AES][1].
This is the first attack on the full-rounded version of AE... |
I saw [Martijn Grooten's talk on elliptic curves](https://securitybsideslondon2015.sched.org/event/bc9d2387a4997a48ff0fbdbdd27a7f04#) at BSides London this year, and it helped me understand how elliptic curve crypto works, especially in the case of Diffie-Hellman (ECDH). He also touched on the use of EC for random numb... |
Why does anyone use elliptic curves for a CSPRNG? |
There's no risk in sending the (authenticated) packet length unencrypted as it's already observable by packet-inspection.
As you use AES-GCM, which adds a constant overhead (128-bit?) to the message and the TLS-specification is quite strict for the meta-data and there's no length extension (as is the case with CBC m... |
I'm a beginner to ECC crypto programming. Does any one explain to me the difference with using ECDH for shared key exchange and use of ECIES by encrypting shared key with the public key of the receiver ? I'm feeling that ECIES could also provide me secure key exchange as long as the private key is kept secret. Thank yo... |
In a lot of cases OTP will be completely impractical. If instead of a truly random pad you use a pseudo random pad, you will have something a lot more practical. But it is no longer OTP, and the security proofs about OTP means nothing in that case. I think this is the essence of the Bruce Schneier quote you mention.
... |
In a lot of cases OTP will be completely impractical. If instead of a truly random pad you use a pseudo random pad, you will have something a lot more practical. But it is no longer OTP, and the security proofs about OTP means nothing in that case. I think this is the essence of the Bruce Schneier quote you mention.
... |
Recently Bi-clique Cryptanalysis allowed to obtain following results on full AES ES that claim to have
- The first key recovery attack on the full AES-128 with computational
complexity $2^{126.1}$
- The first key recovery attack on the full AES-192 with computational complexity $2^{189.7}$
- The first key r... |
**The simple answer is nobody can prove that an algorithm won't break in a given period of time.** The achievable goal is to increase the probability that no effective attack will be developed without warning. There are a couple of characteristics that indicate a particular cipher may remain secure and if degraded wi... |
say that one use a known lfg (2 known lags a & b, known inner state length N, known modulo m) to hide some text with a basic à-la Vigenere cipher [Ci=(Pi+PRNGi) mod 26],
say that the adversary intercept some ciphered text (not the lfg output),
could they use it to perform a correlation attack to get the initial... |
Is the one-time-pad a secure system according to modern definitions? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.