instruction stringlengths 15 30k |
|---|
At the risk of sounding stupid and being laughed at...I must ask this question. What is required to decrypt an encrypted file? Obviously you need the appropriate key to decrypt, but is any other information needed in order to correctly decrypt the content?
Please forgive me as I am just learning cryptography and thi... |
What is required to decrypt an encrypted file? |
Given a toy cipher that picks a key, k, from the key space of {00,01,10} and a message,m, from the same set {00,01,10} and encrypts using E = m ⊕ k.
How can I change the encryption function E in order to make this cipher perfect(according to Shannon's perfect secrecy rule)?
NOTE: This cipher is not perfect becaus... |
How can I turn this cipher into a perfect cipher by altering only its encryption algorithm? |
Let's assume we have a message M and it's signature S and that | is
the concatenation operator.
Should we encrypt S|M or M|S ?
Does it even matter ?
|
Should the MAC be prefix or postfix to the message in the sign-then-encrypt scheme? |
I would like an answer that could be sustained by a mathematical proof.
Let's say I'm using AES-CCM to encrypt a lot of messages, and I always use a different nonce.
I know that when the nonce space gets exhausted, the encryption key needs to be changed.
The question is: even though my encryption key has not b... |
Is there any benefit of changing the AES-CCM encryption key periodically even if the Nonce space is not exhausted yet? |
Is there a standardized padding scheme which is prefix instead of postfix
and that uses random bytes except for the first byte which would be the
length of the padding?
|
Is there some prefix random padding scheme? |
Should the signature be prefix or postfix to the message in the sign-then-encrypt scheme? |
Let's assume we have a message M and it's signature S and that | is
the concatenation operator.
Should we encrypt S|M or M|S ?
Does it even matter ?
|
Let c = a.b mod p
where p is n bit prime number (e.g. 128 or 160 bit prime number);
a - random number between 1 and (p-1);
b - random number between 1 and (p-1);
Given c, a and p, how hard to compute b?
|
Our application requires some 'mild' form of 'proof of origin' for the tokens we issue (~200 bytes), however, the value of each is trivial.
The requirement is to provide 'tamper resistance' rather than 'unforgeable', to not bloat the token size, and to use commonly available 'standard' libraries and tools.
In the t... |
I would like an answer that could be sustained by a mathematical proof.
Let's say I'm using AES-CCM to encrypt a lot of messages, and I always use a different nonce.
I know that when the nonce space gets exhausted, the encryption key needs to be changed.
The question is: even though my encryption key has not b... |
I have some trouble to understand what happends when a lfsr is clocked. I have tried many examples but I do not get it correct, so if anyone can point out my errors I would be happy!
So, I have the following polynomial: $f(x)=1+x+x^5+x^6+x^8$
I am working on this as a part of a known plaintext attack and I have the... |
How to clock a linear feedback shift register? |
I have just started reading the Scale-Invariant [Fully Homomorphic Encryption over the Integers][1] paper and I'm a bit confused about something:
When decrypting the ciphertext:
c = r + (m+2r*) x ((p-1) / 2) + q*p^2
using the decryption function m = (2c mod p) mod 2, I get -m instead of m. Can someone please e... |
I have some trouble to understand what happends when a LFSR is clocked. I have tried many examples but I do not get it correct, so if anyone can point out my errors I would be happy!
I have the following polynomial: $f(x)=1+x+x^5+x^6+x^8$
I am working on this as a part of a known plaintext attack and I have the... |
I have just started reading the Scale-Invariant [Fully Homomorphic Encryption over the Integers][1] paper and I'm a bit confused about something:
When decrypting the ciphertext:
c = r + (m+2r*) x ((p-1) / 2) + q*p^2
using the decryption function `m = (2c mod p) mod 2`, I get `-m` instead of `m`. Can someon... |
Let's assume we have a message $M$ and it's signature $S$ and that $|$ is
the concatenation operator.
Should we encrypt $S|M$ or $M|S$?
Does it even matter?
|
Is there a standard prefix random padding scheme? |
rHow to clock a linear feedback shift register? |
I have some trouble understanding what happens when a LFSR is clocked. I have tried many examples but I do not get the correct result, so if anyone can point out my errors I would be happy!
I have the following polynomial: $f(x)=1+x+x^5+x^6+x^8$
I am working on this as a part of a known plaintext attack and I h... |
How to clock a linear feedback shift register? |
As far as I understand one big advantage of ECC is that we can use pairings on the group of torsion points of the curve.
I was wondering if it is possible to construct pairings from general finite fields F_q?
If not on finite fields F_q are there other structures in cryptography where pairings are used? |
can pairings only be used with elliptic curves? |
As far as I understand one big advantage of ECC is that we can use pairings on the group of torsion points of the curve.
I was wondering if it is possible to construct pairings from general finite fields $\mathbb F_q$?
If not on finite fields $\mathbb F_q$ are there other structures in cryptography where pairings are... |
I am trying to find a concrete example of the Weil Pairing.
What I have done until now is that I took $E=(x-1)(x-2)(x-3)$ over $F_5$.
I took $E[2]=\{\infty,(1,0),(2,0),(3,0)\}$.
I know that there exist a rational function f such that
\begin{equation*}
div(f)=2[T]-2[\infty]
\end{equation*}
How can I find this fun... |
I have just started reading the Scale-Invariant [Fully Homomorphic Encryption over the Integers][1] paper and I'm a bit confused about something:
When decrypting the ciphertext:
$c = r + (m+2r^*) \cdot \frac{p-1}{ 2} + q \cdot p^2$
using the decryption function `m = (2c mod p) mod 2`, I get $-m$ instead of $m$... |
I have to implement RSA Signature Verification procedure (RSA-2048) on a Cortex M0 based MCU. Can someone point me to existing implementations for the same.
My budget is 15kB Flash and 2-4KB Flash. Haven't been able to find an implementation which fits my requirement.
On a side note, is it even possible to do RSA... |
I have to implement RSA Signature Verification procedure (RSA-2048) on a Cortex M0 based MCU. Can someone point me to existing implementations for the same.
My budget is 15kB Flash and 2-4kB <strike>Flash</strike> RAM. Haven't been able to find an implementation which fits my requirement.
On a side note, is it ev... |
**Update**: A general method is given by Elena Dubrova: [_A Scalable Method for Constructing Galois NLFSRs with Period $2^n-1$ using Cross-Join Pairs_][1], in IEEE Transactions on Information Theory, Volume 59, Issue 1 ([alternate link][2]). It gives an extensive bibliography of earlier constructs.
These constructio... |
I'm creating a messaging application that will use an outlook account to send an email. However, I'm unsure about the proper steps to store the e-mail password on the user's computer. Suppose I had the following code:
SmtpClient SmtpServer = new SmtpClient("smtp.live.com");
var mail = new MailMessage();
... |
I'm creating a messaging application that will use an outlook account to send an email. However, I'm unsure about the proper steps to store the e-mail password on the user's computer. Suppose I had the following code:
SmtpClient SmtpServer = new SmtpClient("smtp.live.com");
var mail = new MailMessage();
... |
Why do we use a permutation table in the first step of [DES algorithm][1] and one at the end of the algorithm?
[1]: http://en.wikipedia.org/wiki/Data_Encryption_Standard |
I'm new to cryptography and I'm trying implement a file encryption feature into a Python program but I'm running into a big issue...what is needed for someone else to decrypt the file?! Obviously, I can decrypt the file on my end. I'm not worried about that.
Basically, **I need to encrypt a file and send it to anoth... |
Can a file encrypted with one tool be decrypted with different tool? |
If one is going to use an HMAC, I.E: http://php.net/manual/en/function.hash-hmac.php, where exactly are they storing the key? Without some sort of secure storage (i.e not in a local file or code), I feel like one is fooling oneself if using the above function. I hope this is not off topic for this forum.
|
I am currently implementing the SHA256 hash-algorithm for a "custom-built" embeded-device. Obviously I have a problem with message padding. The routine I wrote does not work with message whose size equals exactly 512 bits.
In that case, how should the message be padded ? i.e.
M = "AABBCCDDEEFFGGHHIIJJKKLLMMNN... |
As mentioned in the comments what the receiver *needs* to know is effectively:<br> **Formats, Algorithms and Keys**.
Now this may be a bit of an unsatisfying answer to most people, so I'll go into more detail.
## Formats ##
The sender and the receiver have to agree on a format on how to actually read the data ... |
I am currently implementing the SHA256 hash-algorithm for a "custom-built" embeded-device. Obviously I have a problem with message padding. The routine I wrote does not work with message whose size equals exactly 512 bits.
In that case, how should the message be padded ? i.e.
M = "AABBCCDDEEFFGGHHIIJJKKLLMMNN... |
I'm creating a messaging application that will use an outlook account to send an email. However, I'm unsure about the proper steps to store the e-mail password on the user's computer. Suppose I had the following code:
SmtpClient SmtpServer = new SmtpClient("smtp.live.com");
var mail = new MailMessage();
... |
If one is going to use an HMAC, I.E: http://php.net/manual/en/function.hash-hmac.php, where exactly are they storing the key?
Without some sort of secure storage (i.e not in a local file or code), I feel like one is fooling oneself when using a HMAC (as with the above function). I missing something related to the st... |
HMAC key storage for a web app? |
I have to implement RSA Signature Verification procedure (RSA-2048) on a Cortex M0 based MCU. My budget is 15kB Flash and 2-4kB <strike>Flash</strike> RAM.
Is it even possible to do RSA on a low end MCU based on Cortex M0?
|
I am doing a paper on textbook RSA (this is for high school btw) and in my example I need two very large primes, but I want my e = 3. Is there a short way to calculate the values of p and q such that gcd(e, φ(pq)) = 1 ?
Please help. |
Values of p and q when e = 3 (RSA)? |
I am doing a paper on textbook RSA (this is for high school btw) and in my example I need two very large primes, but I want my $e = 3$.
Is there a short way to calculate the values of $p$ and $q$ such that $gcd(e, φ(pq)) = 1$?
|
I'm creating a messaging application that will use an outlook account to send an email. However, I'm unsure about the proper steps to store the e-mail password on the user's computer. Suppose I had the following code:
SmtpClient SmtpServer = new SmtpClient("smtp.example.com");
var mail = new MailMessage();
... |
I am studying the cipher suits provided by TLS 1.2 and found an interesting question.
TLS 1.2 adopts GCM for encryption and SHA256 or SHA384 for hash (e.g. TLS_RSA_WITH_AES_128_GCM_SHA256). But, GCM already provides data authenticity (integrity).
So, my question is that why TLS 1.2 includes another hash functions... |
Why TLS 1.2 use GCM with additional SHA hash? |
I am studying the cipher suites provided by TLS 1.2 and found an interesting question.
TLS 1.2 adopts GCM for encryption and SHA256 or SHA384 for hash (e.g. TLS_RSA_WITH_AES_128_GCM_SHA256). But, GCM already provides data authenticity (integrity).
So, my question is that why TLS 1.2 includes another hash function... |
Why does TLS 1.2 use GCM with additional SHA hash? |
I am currently implementing the SHA256 hash-algorithm for a "custom-built" embeded-device. Obviously I have a problem with message padding. The routine I wrote does not work with message whose size equals exactly 512 bits.
In that case, how should the message be padded ? i.e.
M = "AABBCCDDEEFFGGHHIIJJKKLLMMNN... |
Hypothesis: Let $z,a$ be uniformly random elements of a field $\mathbb{F}_p$ where $p$ is a large prime number. Also, let $(-z)$ be additive inverse of $z$.
-----------------------------------------
I have a fixed secret value $x$. I mask it as $I=x+z$ and send it to a semi-honest server.
Later on, I send $w$... |
> I had a look at classic transpositioning and substitution methods which lead me to encryptions like Vigenére, Autokey, Beaufort and so on. However, those are designed to work with non-numeric alphabets as far as my understanding goes.
While most classical ciphers are applied to the usual alphabet (without differen... |
Noting a recent release of a 1000 qubits quantum computer,
http://www.dwavesys.com/press-releases/d-wave-systems-breaks-1000-qubit-quantum-computing-barrier
had me wondering.....<br><br>
Does the number of qubits nonlinearly change the speed/rate at breaking a SHA256 hash?
If someone makes a say 10,000 qubit pro... |
I'm trying to decrypt a cipher that I suppose has been encrypted with Vigenére.
However I came about the following thought:
The cipher consists of characters from [cghijklmnopqrsuvwxyz0-6+A-GI-WYZ].
My thought: The characters seen in the cipher need to be in the alphabet used when encrypting via Vigenére. However ... |
I've read about the "Weak Diffie-Hellman" attack ([paper](https://weakdh.org/imperfect-forward-secrecy-ccs15.pdf), [website](https://weakdh.org/)), where a resourceful entity like a state can pre-compute values for known primes to aid solving the discrete logarithm problem for that particular prime.
I've also read t... |
State level "Weak Diffie-Hellman" working for SRP too? |
If you have a random uniform sequence of bits $A$ generated by a TRNG with good performance of randomness tests (eg Dieharder, NIST, Kolmogorov complexity, chi-square, etc) and perform an encryption (eg AES) with a known deterministic key $B$ so that it results in a new encrypted sequence $C$.
Is the encrypted seque... |
Does an encrypted random sequence conserve its "randomness"? |
Noting [D-Wave's press release][1] on a 1000 qubits quantum computer had me wondering...
Does the number of qubits nonlinearly change the speed/rate at breaking a SHA256 hash?
If someone makes a say 10,000 qubit processor, does this speed up cracking the hash more than 10 times (linearly) faster?
[1]: http... |
I'm trying to decrypt a cipher that I suppose has been encrypted with Vigenére.
However I came about the following thought:
The cipher consists of characters from [cghijklmnopqrsuvwxyzABCDEFGIJKLMNOPQRSTUVWYZ0-6+].
My thought: The characters seen in the cipher need to be in the alphabet used when encrypting via Vi... |
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" is just one example for a cipher suite, as far as I'm concerned it means this:
It uses the TLS protocol, exchanges keys with Elliptic Curve Diffie Hellman Ephemeral, whose public keys are signed with RSA and afterwards AES 128 bit is used with the Galois Counter Mode, which pr... |
Why does AES-GCM need a hash/MAC in TLS? |
I was just wondering if I add more security by combining two or more symmetric encryption algorithms on a plain text.
For example: `Plaintext → AES → Twofish → Serpent`
Of course a different key and IV (produced with a cryptographic secure prng) is used for each algorithm. Speed fortunately is not important.
... |
Suppose party `A` has two pieces of data, `X` and `Y`, either of which may change separately, or they may change together.
Given the following constraints:
1. `A` has no memory - it does not know its previous values
2. There is only one-way communication, outward from `A`
3. `X` can be publicly shared, but `Y` ... |
How to publish changes in data while preserving confidentiality (under constraints)? |
Suppose party `A` has two pieces of data, `X` and `Y`, either of which may change separately, or they may change together.
Given the following constraints:
1. `A` has no memory - it does not know its previous values
2. There is only one-way communication, outward from `A`
3. `X` can be publicly shared, but `Y` ... |
I want my application to generate an EC key pair.
The first four bytes of the sha256 hash of the public key should contain a known IP address.
As hashes are one-way functions, I need to brute force this by generating four billion keys, with an expectation that a matching public key hash would be found after two b... |
Can a billion ec keys be generated on a laptop in less than an hour? |
Suppose party `A` has two pieces of data, `X` and `Y`, either of which may change separately, or they may change together.
Given the following constraints:
1. `A` has no memory - it does not know its previous values
2. There is only one-way communication, outward from `A`
3. `X` can be publicly shared, but `Y` ... |
Suppose party `A` has two pieces of data, `X` and `Y`, either of which may change separately, or they may change together.
Given the following constraints:
1. `A` has no memory - it does not know its previous values, nor can it store anything else
2. There is only one-way communication, outward from `A`
3. `X` ... |
Suppose party `A` has two pieces of data, `X` and `Y`, either of which may change separately, or they may change together.
Given the following constraints:
1. `A` has no memory - it does not know its previous values, nor can it store anything else
2. There is only one-way communication, outward from `A`
3. `X` ... |
Suppose party `A` has two pieces of data, `X` and `Y`, either of which may change separately, or they may change together.
Given the following constraints:
1. `A` has no memory - it does not know its previous values, nor can it store anything else
2. There is only one-way communication, outward from `A`
3. `X` ... |
Suppose party `A` has two pieces of data, `X` and `Y`, either of which may change separately, or they may change together.
Given the following constraints:
1. `A` has no memory - it does not know its previous values, nor can it store anything else
2. There is only one-way communication, outward from `A`
3. `X` ... |
Can a billion elliptic curve keys be generated on a laptop in less than an hour? |
I want my application to generate an EC key pair.
The first four bytes of the sha256 hash of the public key should contain a known IP address.
As hashes are one-way functions, I need to brute force this by generating four billion keys.
Is this possible, in under an hour, on a laptop?
Openssl is not the way... |
In the Kerberos authentication protocol, as described [here][1]:
[![kerberos][2]][2]
would it be safer to replace step (1) with:
$$
A \rightarrow T : A, E_{K_A{_{T}}}(B, N_A)
$$
so that a passive adversary does not know the identity of party B with which A wishes to communicate?
Or even add an extra l... |
Suppose party $A$ has two pieces of data, $X$ and $Y$, either of which may change separately, or they may change together.
Given the following constraints:
1. $A$ has no memory - it does not know its previous values, nor can it store anything else
2. There is only one-way communication, from $A$ outward
3. $X$ ... |
Is a memory-hard proof-of-work scheme necessarily resistant to speedups from custom ASICS?
Background: Bitcoin uses a proof-of-work scheme based on SHA256 hashing. The scheme is compute-bound. Initially, people would mine solutions on their PCs or GPUs. However, eventually it was noticed that a custom ASIC (a cus... |
Memory-hard proof-of-work: are they ASIC-resistant? |
<br>
We know that a good hash function is a one way/trapdoor function. Easy to calculate one way, harder to work out a previous state.<br>
I was wondering if anyone knew a good hashing system that allowed you to calculate an arbitary number of steps into the state future. <br>
E.g. instead of runnning the hash fun... |
The latest AMD programmer manuals, dated June 2015, include the `RDRAND` instruction in the instruction set. Confer, [AMD64 Architecture Programmer’s Manual Volume 3: General-Purpose and System Instructions](http://support.amd.com/TechDocs/24594.pdf), page 279.
The description includes the text:
> Loads the desti... |
The latest AMD programmer manuals, dated June 2015, include the `RDRAND` instruction in the instruction set. Confer, [AMD64 Architecture Programmer’s Manual Volume 3: General-Purpose and System Instructions](http://support.amd.com/TechDocs/24594.pdf), page 279.
The description includes the text:
> Loads the desti... |
<br>
We know that a good hash function is a one way/trapdoor function. Easy to calculate one way, harder to work out a previous state.<br>
I was wondering if anyone knew a good hashing system that allowed you to calculate an arbitrary number of steps into the state future. <br>
E.g. instead of running the hash fun... |
In textbook RSA, the Euler $\varphi$ function
$$\varphi(pq) := (p-1)(q-1)$$
is used to define the private exponent $d$. On the other hand, real-world cryptographic specifications require the Carmichael lcm function
$$\lambda(pq) := \operatorname{lcm}(p-1,q-1)$$
to define $d´$.
It is clear that the $d´$ divides $d$... |
I'm pondering a problem of how to enable transfers of files from clients to people that does not yet have an application/account/keys yet.
Here's my current thought for Alice wanting to send Bob FancyPants.png through my tool:
1. Generate random UUID
2. Generate encryption keys from that UUID
3. Encrypt Fanc... |
I'm pondering a problem of how to enable transfers of files from clients to people that does not yet have an application/account/keys yet.
Here's my current thought for Alice wanting to send Bob FancyPants.png through my tool:
1. Generate random UUID
2. Generate encryption keys from that UUID
3. Encrypt Fanc... |
I really only see three options you have for storing the key if you want to use to do the password verification on a server that reboots:
- **Use a trusted device connected to the server**. This includes smart cards (they may be too slow), *trusted platform modules* (TPMs; which may also be too slow) and *hardware ... |
I have been seraching if Mersenne Twister generate homogeneus distribution of numbers but I don't find nothing. I have found a lot of test and propieties but I do not know If any of those propieties/tests refers to the homogeneity.
Can you explain me If the algorithm generates homogeneus numbers, why and what are th... |
Does Mersenne Twister generate homogeneus numbers? |
Say that Alice encrypts a $plaintext$ with $key_{m}$ and gives the $ciphertext_m$ to Bob. Alice wants to send several gigabytes of $plaintext$ to Eve but she is on a mobile 3G connection. So instead, Alice and Eve exchange a new secret $key_{eve}$. She then creates a $key_{mutate} = Keymutate(key_m, key_{eve})$ and sen... |
The latest AMD programmer manuals, dated June 2015, include the `RDRAND` instruction in the instruction set. Confer, [AMD64 Architecture Programmer’s Manual Volume 3: General-Purpose and System Instructions](http://support.amd.com/TechDocs/24594.pdf), page 279.
The description includes the text:
> Loads the desti... |
Before we get into the key storage and management issues, I wanted to clarify the scheme that is proposed in the linked article, to make sure it is clear what we are talking about.<br>
Let's assume we get `pw` for authentication from the user and retrieve `salt` and `tag` from the database and we get `sk` from the sto... |
<p>Please criticize the (homebrew?) mode described below; to point out a single major defect/uncertainty or the link to (the analysis of) an equivalent construction is quite enough. Assume the performance is ignored in favor of security.</p>
<p>This scheme looks like something that emerges from time to time. Here is... |
AES-256 mode with per-block-key being a SHA-256 of SHA-256 of secret key, random public salt and block number. What's amiss? |
Suppose party $A$ has two pieces of data, $X$ and $Y$, either of which may change separately, or they may change together.
Given the following constraints:
1. $A$ has no memory - it knows its current $X$ and $Y$ but not the previous values, nor can it store anything else
2. There is only one-way communication, f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.