instruction stringlengths 15 30k |
|---|
a bit of history
----------------
Historically, [one-time pads][1] written on paper were almost invariably one of two types: "alphabetic" or "decimal".
CT-46 is one type of [straddling checkerboard][2] encoding -- but CT-46 assumes you are using a decimal one-time pad.
* Alphabetic ("base 26"): the key pad ha... |
My example code are as follows:
/*
* Example 1
* 1) Calculate g^a
* 2) calculate g^{-a}
* 3) multiply g^a * g^{-a}
*
*/
NOTE: here pub->p is a type A pairing.
element_t g, gA,gInverseA, a;
element_init_G1(g,pub->p);
element_init_G1(gA,pub->p);
element_init_G1(... |
Using PBC library When I am computing g^a * g^{-a} it results zero why ? |
My example code is as follows:
/*
* Example 1
* 1) Calculate g^a
* 2) calculate g^{-a}
* 3) multiply g^a * g^{-a}
*
*/
NOTE: here pub->p is a type A pairing.
element_t g, gA,gInverseA, a;
element_init_G1(g,pub->p);
element_init_G1(gA,pub->p);
element_init_G1(g... |
Why does computing g^a * g^{-a} with the PBC library result in zero? |
My example code is as follows:
/*
* Example 1
* 1) Calculate g^a
* 2) calculate g^{-a}
* 3) multiply g^a * g^{-a}
*
*/
**Note:** here `pub->p` is a type A pairing.
element_t g, gA,gInverseA, a;
element_init_G1(g,pub->p);
element_init_G1(gA,pub->p);
element_init_G1... |
**Notation:** $\Sigma^k$ is the set of $k$-strings on the alphabet $\Sigma$; $\Sigma^\ast$ is the set of all finite dimensional strings on the alphabet $\Sigma$.
----------
In the context of computer-science a strong one-way function is generally defined as follows:
A function $f:\Sigma^{\ast}\longrightarr... |
As we konw, the Full Cramer-Shoup Encryption need to choose six random numbers from Z{q}, which we denote them by $ x_1,x_2,y_1,y_2,z_1,z_2 $,then the scheme hiden these random numbers in the $c=g_1^{x{1}}g_2^{x{2}}, d=g_1^{y{1}}g_2^{y{2}}, h=g_1^{z{1}}g_2^{z{2}}$.
It is clear that the proportion of public key to pr... |
The Full Cramer-Shoup Encryption scheme needs to choose six random numbers from $\mathbb{Z}_q$, which we denote them by $ x_1,x_2,y_1,y_2,z_1,z_2 $. Then the scheme hides these random numbers in the values $c=g_1^{x{1}}g_2^{x{2}}$, $d=g_1^{y{1}}g_2^{y{2}}$, $h=g_1^{z{1}}g_2^{z{2}}$.
It is clear that the proportion o... |
Criticisms of a cipher system such as 'the ciphertext from one message must be indistinguishable from the ciphertext of a second message" surely only apply when there are very large amounts of ciphertext available. If a stream cipher involves a limited number of messages (say 10) of limited length (say 1000 characters ... |
Don't the accepted definitions of cryptographic security assume that very large amounts of ciphertext are available? |
A viable answer to the question, as posed in the title, is: **No**
> If a stream cipher involves a limited number of messages (say 10) of limited length (say 1000 characters each) enciphered with differently keyed streams, then surely there is not sufficient information available for breaking the cipher?
As you... |
Here's a paper that just made its way into Cryptology ePrint Archive: [Fine grain Cross-VM Attacks on Xen and VMware are possible!](http://eprint.iacr.org/2014/248).
Its a good survey of past attacks and presents a couple of new techniques for AES against OpenSSL, PolarSSL and Libgcrypt.
Why did the authors use O... |
Both can be used to verify the integrity of a message. Assuming you have the needed primitives available to you (i.e. the code space of needing both a cipher and a hash function isn't prohibitive), is there any reason to prefer one over an other? In practice HMAC seems to be much more widely used, is that a result of c... |
Use cases for CMAC vs. HMAC? |
please help me pick right design of software
I have to design client-server software, where server should verify that client runs software from exact source code. And where software doesn't simulate actions(results of algorithms). So we accept that client could be compromised.
The real task behind this question... |
Can I prove set membership and uniqueness without revealing the element? |
I just noticed that [on the NIST website][1] there is a PDF with a draft of the SHA-3 standard (i.e. FIPS 202) (marked as "new", and seemingly the page was last changed on April 7, 2014).
Previously [it was discussed here][2] that NIST would be changing stuff compared to the submission, which was seen as problematic... |
What are the key differences between the draft SHA-3 standard and the Keccak submission? |
Apple is releasing some updates today. They have not published the bulletins yet, but they are available here: https://gist.github.com/FredericJacobs/11189734.
In the writeup for CVE-2014-1295:
> Security - Secure Transport
> ...
>
> Impact: An attacker with a privileged network position may c... |
I noticed that several hash algorithms, in this case MD5, defines some constants.
MD5 defines 64 constant values (the shift count per round) which also gets expand (via sine) to a summand for a specific round. It is like a lookup table.
But I cannot see anything (no documentation, no implementation,...) that call... |
Are the MD5 constants an S-Box? |
> Is it valid to call this table an S-Box?
Not really; at least, not with the meaning we usually give to "S-box".
The "S" in "S-box" stands for Substitution; we take the data, and replace it with a value from the S-box (using the data as an index into the S-box). The classical (if not the original) example is t... |
In "Encryption Schemes for Computer Confidentiality", Pless describes how to use the J-K flip flop as a nonlinear combiner for linear feedback shift registers. This generator was broken because the J-K flip flops are not correlation immune but my question concerns the basic nonlinearity of the J-K function itself: how ... |
There is any cryptography system that have a good reputation based on NP cpmplete problem?
I read about the knapsack, but it was cracked. |
Suppose $H$ is a hash function , why $H(k||H(k||m))$ is not secure?
see [HMac][1] definition , in there , indeed two keys are used and mac algorithm is $H(k_1 ||H(k_2 ||m))$ . my question is why not to use $H(k||H(k||m))$ and using only one key?
[1]: http://en.wikipedia.org/wiki/Hash-based_message_authent... |
I'm working on a chat server for a mobile app I am writing. I would like to use a different application server for non-chat related operations and another application for chat operations.
I would like to encrypt the user's id, the user's username, and the name of the chat stream and pass those to the client—and stor... |
Suppose $H$ is a hash function; why is $H(k||H(k||m))$ not secure?
See this [HMAC definition][1]. In there, indeed two keys are used and the mac algorithm is $H(k_1 ||H(k_2 ||m))$ . Why don't we use $H(k||H(k||m))$, which has only one key?
[1]: http://en.wikipedia.org/wiki/Hash-based_message_authentication_... |
It doesn't need to be crazy secure.
I wanted to figure out if there's a popular practice when encrypting a short phrase (less than 32 letter long) into two keys (two strings 32 length).
Doesn't need to be complicated. It's for a hobby project.
For example
Key 1: JFHEL1J2J1KD1FK4J4K3LA5D7EKSJX323
Key 2: 1HFK6SJD... |
It doesn't need to be crazy secure.
I wanted to figure out if there's a popular practice when encrypting a short phrase (less than 32 letter long) into two keys (two strings 32 length).
Doesn't need to be complicated. It's for a hobby project.
For example
Key 1: JFHEL1J2J1KD1FK4J4K3LA5D7EKSJX323
Key 2: 1HFK... |
Is there any possible way to filter a key space in a crypto-system to get a set of keys that decrypts out a valid text (text that is in same language or readable)?
I tried a random approach and got certain set of keys but its not that appreciative to actually required text size
**code**
from Crypto.Cipher... |
I noticed some strange behaviour when adding different characters onto the end of the key then inputting it into HMAC and I was getting the same output hash. First I generated a key and message to test with:
Message = SHA-256('abc') =
`ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad`
Key = SHA-2... |
I want to pre-compute the result for all possible ciphertext of a homomorphic encryption. Is it acheivable?
Is there a fully homomorphic encryption scheme (additively homorphic encryption scheme) that has the same size of plaintext space and ciphertext space? |
Which homomorphic encryption scheme has the same size of plaintext space and ciphertext space? |
Is less security required for a short stream cipher than for the AES enciphering of very long messages? |
I would like to know if there is an algorithm to generate a RSA key at the state of the art of the present cryptanalysis.
Beside the key lenght I know there are some weakness in the choice of prime numbers that could help an attacker to factor the modulus $N$.
The standard key generation, as far as I know, genera... |
I want to pre-compute the result for all possible ciphertext of a homomorphic encryption. Is it acheivable?
Is there a fully homomorphic encryption scheme that has the same size of plaintext space and ciphertext space? |
First, you should start by guessing which symbols in the ciphertext are actually enciphered, and which are simply written in plain. (Don't worry if you guess wrong, you can always make several guesses.) For a Vigenère cipher, one also needs to guess whether any non-encrypted characters should advance the key position... |
How can I generate a brief (100) stream of random numbers, not using the computer or throwing dice? |
First, you should start by guessing which symbols in the ciphertext are actually enciphered, and which are simply written in plain. (Don't worry if you guess wrong, you can always make several guesses.) For a Vigenère cipher, one also needs to guess whether any non-encrypted characters should advance the key position... |
<p>
Crypto Stack Exchange is for software developers, mathematicians and others interested in cryptography.
</p>
<p>Cryptography Stack Exchange is for asking questions about the mathematics and properties of cryptographic systems, their analysis ("cryptanalysis") and subsidiary topics that generally make up crypto... |
<p>The best answer is almost certainly to use a cryptographic hash. </p>
<p>Your reason for avoiding a cryptographic hash makes no sense to me. Your problem does not explain the motivation for your question, but I suspect you've fallen prey to <a href="http://meta.stackexchange.com/questions/66377/what-is-the-xy-prob... |
Can we do frequency analysis of transposition ciphers?
If yes, please tell me the procedure and i would be happy if you provide me with some links related to it
i heard that it can be done using bi-gram frequency
i did for substitution ciphers but unable to do it for transposition cipher
Please help!!! |
Can we do frequency analysis of transposition ciphers?
<br>
If yes, please tell me the procedure and I would be happy if you provide me with some links related to it.
<br>
I heard that it can be done using bi-gram frequency.
<br>
I did it for substitution ciphers but am unable to do it for transposition ciphers. |
Suppose there are two elements $a = g^x$ and $b = h^x$, where $g$ and $h$ are generators in $Z^*_p$ and $p$ is a large prime. How can we prove that $a$ and $b$ have the same discrete logarithms with respect to $g$ and $h$ respectively without leaking the knowledge of $x$? |
How can we prove that two discrete logarithms are equal? |
<p>
Crypto Stack Exchange is for software developers, mathematicians and others interested in cryptography.
</p>
<p>Cryptography Stack Exchange is for asking questions about the mathematics and properties of cryptographic systems, their analysis ("cryptanalysis") and subsidiary topics that generally make up crypto... |
The best answer is almost certainly to use a cryptographic hash.
Your reason for avoiding a cryptographic hash makes no sense to me. Your problem does not explain the motivation for your question, but I suspect you've fallen prey to [the XY problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-prob... |
**There is consensus that it is safe to use random primes $p$ and $q$ when generating 2048-bit (or wider) RSA public moduli which two prime factors $p$ and $q$ are about half the key size**. That is sanctioned by [FIPS 186-4][1], appendix B.3. Even though that reference requires $p-1$, $q-1$, $p+1$, $q+1$ having a... |
**There is consensus that it is safe to use random primes $p$ and $q$ when generating 2048-bit (or wider) RSA public moduli which two prime factors $p$ and $q$ are about half the key size**. That is sanctioned by [FIPS 186-4][1], appendix B.3. Even though that reference requires $p-1$, $q-1$, $p+1$, $q+1$ having a... |
**There is consensus that it is safe to use random primes $p$ and $q$ when generating 2048-bit (or wider) RSA public moduli which two prime factors $p$ and $q$ are about half the key size**. That is sanctioned by [FIPS 186-4][1], appendix B.3. Even though that reference requires $p-1$, $q-1$, $p+1$, $q+1$ having a... |
>Is there a fully homomorphic encryption scheme that has the same size of plaintext space and ciphertext space?
As far as I know, none have this property and it makes sense when you think about it.
IF the plaintext and ciphertext spaces are the same size, you cannot achieve semantic security. A good example of th... |
I've had an assignment to sign a file using hash and salt, so I read about salt and I got why it's important when it comes to password, but not to sign messages.
1. How do I sign something using salt? The only way I could think of is that I add the salt to the message then hash both and then send the hash along with... |
**There is consensus that it is safe to use random primes $p$ and $q$ when generating 2048-bit (or wider) RSA public moduli which two prime factors $p$ and $q$ are about half the key size**. That is sanctioned by [FIPS 186-4][1], appendix B.3. Even though that reference requires $p-1$, $q-1$, $p+1$, $q+1$ having a... |
**There is consensus that it is safe to use random primes $p$ and $q$ when generating 2048-bit (or wider) RSA public moduli which two prime factors $p$ and $q$ are about half the key size**. That is sanctioned by [FIPS 186-4][1], appendix B.3; specifically, wording in B.3.1 item A:
> Using methods 1 and 2 [yieldi... |
There is any cryptography system that have a good reputation based on NP complete problem?
I read about the knapsack, but it was cracked. |
Are you limited to working with $g$ and $h$ being generators of the entire group $\mathbb{Z}_p^*$? In that case
you have a problem with knowledge extraction in the proof of knowledge (basically, since you are not working in a field "in the exponent", but in $\mathbb{Z}_{p-1}$, the required multiplicative inverses mig... |
No, the problem is np-completeness or even np-hardness is a worst case thing. In crypto, we don't want our systems to be unbreakable only in the worst case. We want them to be unbreakable at least in the average case. It would be better if it were unbreakable in the best case (or all cases).
Another, related, issue ... |
**There is consensus that it is safe to use random primes $p$ and $q$ when generating 2048-bit (or wider) RSA public moduli which two prime factors $p$ and $q$ are about half the key size**. That is sanctioned by [FIPS 186-4][1], appendix B.3; specifically, wording in B.3.1 item A:
> Using methods 1 and 2 [yieldi... |
[_RSA for Paranoids_ (RSAP)][1] (in cryptobytes v3n1), also known as Unbalanced RSA, is a variant of RSA proposed in 1995 by Adi Shamir, as a mean to increase the RSA public modulus size while keeping computation cost moderate. It is getting renewed interest, as part of a lightweight authentication and key agreement pr... |
Here is the problem. For a specific ciphertext, sure you could try a bunch of keys and output the couple that result in the type of plaintext you want. But what does this really get you? For a different ciphertext, likely these same keys will not result in the same type of plaintext you desire.
Recent work on [honey... |
There are many cases in maths where doing the same thing over and over again will bring you closer to a value. Derivation of polynomials is the striking example: no matter what you start with, you end up with 0. In a series expansion, the longer you continue the sequence the closer you get to the real value.
This co... |
Will hashing over and over eventually give the same hash? |
I have the following question about TLS security:
Assume TLS-PSK protected HTTP with AES256-CBC cipher.
When TLS connection is established, client send some encrypted data, where
plaintext is well known to an attacker. For example, it can be HTTP request, like:
GET /some_resource HTTP/1.1
...
Can a... |
I have the following question about TLS security:
Assume TLS-PSK protected HTTP with AES256-CBC cipher.
When a TLS connection is established, client sends some encrypted data, where the
plaintext is well known to an attacker.
<br>
For example, it can be a HTTP request, like:
GET /some_resource HTTP/1.1
... |
Hello I am trying to figure out this question:
Generalize the Merkle-Damgard construction for any compression function that compresses by at least one bit . You should refer to a general
input length £' and general output length E (with £' > E).
It is in my understanding that the Merkle-Damgard takes an input o... |
This question boils down to, "Are there known-plaintext attacks against AES-256-CBC?" The answer is: No, no such attacks better than brute force are known. This would constitute a catastrophic break in AES-256-CBC, and *any* cipher broken in such a way would be abandoned rapidly. |
**There is consensus that it is safe to use random primes $p$ and $q$ when generating 2048-bit (or wider) RSA public moduli which two prime factors $p$ and $q$ are about half the key size**. That is sanctioned by [FIPS 186-4][1], appendix B.3; specifically, wording in B.3.1 item A:
> Using methods 1 and 2 [yieldi... |
**There is consensus that it is safe to use random primes $p$ and $q$ when generating 2048-bit (or wider) RSA public moduli which two prime factors $p$ and $q$ are about half the key size**. That is sanctioned by [FIPS 186-4][1], appendix B.3; specifically, wording in B.3.1 item A:
> Using methods 1 and 2 [yieldi... |
I am trying to figure out this question:
> Generalize the Merkle-Damgard construction for any compression function that compresses by at least one bit . You should refer to a general
input length £' and general output length E (with £' > E).
It is in my understanding that the Merkle-Damgard takes an input of 2*... |
I'm tasked to apply tiger encryption to my string(key). Does anyone have any idea how to find the entropy of the hex output by tiger encryption? |
What's the entropy of the output for Tiger Encryption? |
How to decode a Hill Cipher without a key? |
Classic Feistel Networks and various types of FN's are sequential in nature. [1]has a good overview of different types. But is there a way we can do Feistel Networks in parallel and achieve good security bounds ?
1. Hoang, Viet Tung, and Phillip Rogaway. "On generalized Feistel
networks." Advances in Cryptolog... |
Can we parallelize the Feistel Networks? |
On my exam, we had to solve this problem:
> message matrix is: `[20, 19, 14; 17, 0 10]`
and the ciphertext matrix is: `[18, 15, 16; 3, 24, 24]`.
Find key matrix.
I couldn't solve this problem, because I tried to find key matrix by multiplying
`[20, 19, 14; 17, 0 10]^-1` and `[18, 15, 16; 3, 24, 24]`, but ... |
How can I decode a Hill Cipher without a key? |
It would be trivial to implement the [HMAC][1] construction with [(draft) SHA-3][2], leading to HMAC-SHA3-224, HMAC-SHA3-256, HMAC-SHA3-384, HMAC-SHA3-512 (the last 3 digits are the output size, and half the block size). However, the [original][3] and [improved][4] security arguments/"proofs" of HMAC are made for the [... |
How secure would HMAC-SHA3 be? |
I am setting up a Python program to encipher messages on the following basis:
-from my password, generate 32-byte key from SHA256(password)
-generate a 16-byte IV from a PRNG
-measure the length of the plaintext and express as 2 bytes (my plaintext will be shorter than 2^16 characters)
-pad the plaintext to... |
Do I need two keys for AES CBC and HMAC or can I use the same key for both operations? |
Pls I need explanation on How i can design a Cryptography that use multiple passwords or passphrase to open a safe(Lock). For example, if i need five people to unlock a secured device whereby all the five need to enter their individual password before the device can be opened.
Please how can this be done? I don't ha... |
Start with Shamir's Secret Sharing concepts.
"Abstract. In this paper we formalize the notion of a ring signature, which makes it possible to specify a set of possible signers without revealing which member actually produced the signature. " - (http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.310.2876)
The... |
Start with “Shamir's Secret Sharing” concepts…
> Abstract. In this paper we formalize the notion of a ring signature, which makes it possible to specify a set of possible signers without revealing which member actually produced the signature.
source: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.310.287... |
Note that, despite your notation, the exponent does not need to be prime.
>Why is that?
They probably do that to reduce the impact of malleability on the reconstruction process.
> Which attack does it prevent?
It might prevent simple malleation when the secret is not easily guessable.
> Does it help when... |
I've seen that encrypting an image with AES-CBC then calculating the HMAC-MD5 value for authentication is a somewhat common and sound way to secure data. Alternatively, can I just calculate the CRC of the data, and then encrypt the data+CRC with AES-CBC?
I am concerned about a ciphertext-only attack modifying the d... |
Is HMAC necessary if the AES ciphertext of a message includes the CRC of the message? |
Let's say we have a timestamping scheme of the following characteristics:
The hashes of the documents we are trying to timestamp are xor'ed...
- ...with "events" whose time of occurrence are very publicly known (for example, the hash of the latest block on the blockchain) and...
- ...the hash of t... |
> What is/are difference/s between leveled Fully Homomorphic Encryption
> and normal Fully Homomorphic Encryption? |
Wow that's a broad question. The shortest answer is that lots of Public Key Cryptography is based around a collection of mathematical problems that we believe are hard to solve. Why do we believe they're hard to solve? Because they're age-old Algebra (well, normally Number Theory actually but still) problems that mathe... |
The bilinear map in Identity-based encryption should satisfy $e(aP,bQ)=e(P,Q)^{a\cdot b}$ whereas Attribute-based encryption schemes use $e(P^a,Q^a)=e(P,Q)^{a\cdot b}$ with $a,b\in\mathbb{Z}_p$ and $e:\mathbb{G}_1\times\mathbb{G}_2\rightarrow\mathbb{G}_T$.
Why are they different and are there reasons to prefer one o... |
Perhaps, this is a really obvious question, but I am still having trouble understanding how this all fits together. Why is knowing the number of points on an Elliptic Curve helpful in cracking it? Because it can help factor n (as in mod n) if it's composite? Is it because knowing the order of different points is helpfu... |
Why is knowing the number of points on a curve helps solve ECCDLP? |
Perhaps, this is a really obvious question, but I am still having trouble understanding how this
<br>
all fits together. Why is knowing the number of points on an Elliptic Curve helpful in cracking it?
<br>
Because it can help factor n (as in mod n) if it's composite? Is it because knowing the
<br>
order of diffe... |
Why does knowing the number of points on a curve help solve ECCDLP? |
Perhaps, this is a really obvious question, but I am still having trouble understanding how this all fits together. Why is knowing the number of points on an Elliptic Curve helpful in cracking it?
Because it can help factor $n$ (as in “mod $n$”) if it's composite? Is it because knowing the order of different points ... |
After some digging around in [the HMAC spec][1] I found this (paraphrased):
> Step 1: If the length of Key equals the block size of the hash
> function (512 bits/64 Bytes for SHA-256), set the key equal to the
> key. Go straight to step 4.
>
> Step 2: If the length of key is greater than the block size of hash
... |
Should HMAC or NMAC or plain Keccak be used for a secure MAC? |
After some digging around in [the HMAC spec][1] I found this (paraphrased):
> Step 1: If the length of Key equals the block size of the hash
> function (512 bits/64 Bytes for SHA-256), set the key equal to the
> key. Go straight to step 4.
>
> Step 2: If the length of key is greater than the block size of hash
... |
In [_Encryption Schemes for Computer Confidentiality_][1], Pless describes how to use the J-K flip flop as a nonlinear combiner for linear feedback shift registers.
This generator was broken because the J-K flip flops are not correlation immune but my question concerns the basic nonlinearity of the J-K function itself... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.