instruction stringlengths 15 30k |
|---|
Are formal methods used for cryptographic protocol design? |
I managed to implement the proxy re-encryption scheme from http://eprint.iacr.org/2009/189.pdf in python 2.7, however I am having performance issues. As it is, I can run the algorithm for key sizes up to 5 bits, which is impratical.
I think the problem is the lack of mod operations throughout the algorithm. As the ... |
I'm building a web API. We want to enable some relatively simple encryption, instead of going full-blown OAuth2 (which frankly, IMO, sucks). So I decided to use JWT. Anyway, it could happen for some requests that the request or response payloads are very small. Something like this for example:
{
"order_... |
Maybe this better fits, the security stackexchange...
I'm building a web API. We want to enable some relatively simple encryption, instead of going full-blown OAuth2 (which frankly, IMO, sucks). So I decided to use JWT. Anyway, it could happen for some requests that the request or response payloads are very small. S... |
I am currently working on an implementation of the candidate construction for an indistinguishability obfuscator that was recently proposed by Garg et al. The relevant paper can be found [here](http://eprint.iacr.org/2013/451.pdf). Specifically I am only implementing the construction for circuits in NC1, because the co... |
I managed to implement the proxy re-encryption scheme from http://eprint.iacr.org/2009/189.pdf in python 2.7, however I am having performance issues. As it is, I can run the algorithm for key sizes up to 5 bits, which is impratical.
I think the problem is the lack of mod operations throughout the algorithm. As the ... |
Alice has K;
Bob has E(K, m);
Is there such a scheme that enables Alice decrypts E(K, m) without knowing m, and Bob gets m?
|
Is there an oblivious decryption scheme? |
I'm learning the POK notion and definitions and as a self exercise I wante to prove the statement that the Hamiltonicity protocol is a POK system with knowledge error $1/2$.
So the question will be self-contained, I provide here the slide describing the protocol (credits to Moni Naor, Weizmann institute).
.
After doing research about how people are using formal methods, it seems to me that they're **not** being used for desi... |
I use AES256 for various purposes in my app. However, the purpose I am now trying to achieve is the following:
Input is for example `AU00000001` and I would like a hashed or encrypted output of this with the same length (10 characters). I need to keep the output as small as possible, to convert it into a simple (mi... |
Can I create a fixed length output from a fixed length input? |
This is an exam question:
1. $A \to B$: Alice, $nonce_A$
2. $B \to A$: $nonce_B$, $E_{k_{AB}}(nonce_A \| k_1)$
3. $A \to B$: $E_{k_{AB}}(nonce_B \| k_2)$
Alice and Bob both compute $k_s$ = $k_1$ xor $k_2$
4. $A \to B$: $E_{k_s}(...)$
5. $B \to A$: $E_{k_s}(...)$
The protocol is based on a long term secre... |
Simplest is to use a stream cipher. You will not get authentication, but that would be impossible with format preserving encryption anyway.
Does the encrypted string need have the same character set (e.g. hex or base 64)?
In that case:
1. Transform to binary.
2. Encrypt with stream cipher.
3. Transform back.... |
How about hashes?
1. $P_i$ choose random numbers $R_i$ that they exchange through $S$.
2. They calculate $H_i = H(R_1|R_2|m_i)$ that they give $S$.
3. If $H_1 = H_2$, then $S$ can be reasonably sure $m_1=m_2$.
Assuming $H$ is a strong cryptographic hash function and $R_i$ are long enough to avoid collisions (e.... |
Are they any reductionist proofs where an attacker $\mathcal{I}$ for a well established computationally "hard" problem $\mathsf{Π}$ is employing an attacker $\mathcal{A}$ who we assume is able to break a decisional problem $\mathsf{Γ}$ (i.e: semantic security->guess if $b=1$ or $b=0$) in order $\mathcal{I}$ to break $\... |
p is a prime greater than 2 and $a \in \mathbb{Z}_p$. Why are there exactly three solutions for a³ = a mod p?
Obviously 0 and 1 are both in $\mathbb{Z}$ and valid solutions, but that still means, there is one element (and only one) missing. I can't figure out which one and neither do I understand why there could not b... |
In these systems, is adversary able to generate semi-functional ciphertexts?
Quoting the paper [figlesquidge mentioned in a comment](http://crypto.stackexchange.com/questions/15958/question-about-dual-system-encryption#comment33857_15958):
> <sub>Crypto 2009</sub>
[Dual System Encryption: Realizing Fully S... |
Recently, I have been reading some dual system encryption papers. In these systems, is the adversary able to generate “semi-functional ciphertexts”? |
> 1. Is `/dev/urandom` fine for my use-case or should I use `/dev/random`?
Theoretically, there is no security difference as both are regarded to be cryptographically secure RNGs. Practically, you’ll want to use `/dev/urandom` as that is “non-blocking” since it re-uses it’s entropy-pool whenever it runs out of rando... |
### I want to:
1. Encrypt my whole HDD with a keyfile and a password (meaning that both are required to decrypt it),
2. Be able to back up pieces of the keyfile in several distant locations using Secret Sharing,
3. Be able to change the password often and easily.
### Notes:
- The keyfile is made of 4096 rand... |
> 1. Is `/dev/urandom` fine for my use-case or should I use `/dev/random`?
Theoretically, there is no security difference as both are regarded to be cryptographically secure RNGs. Practically, you’ll want to use `/dev/urandom` as that is “non-blocking” since it re-uses it’s entropy-pool whenever it runs out of rando... |
> If so, could using the twisted curve representation of the curve have any performance benefits over the regular representation?
Yes, at least in some cases. To quote [Twisted Edwards Curves][1] (section 7):
> One can choose $a$ to be very small, making twisted Edwards curves essentially
as fast as Edwards curv... |
As I found out the OpenSSL implementation provided by PHP (openssl_sign) only allows DSS1 as the hashing algorithm for DSA signatures (see also my [related question][1]).
I’d prefer DSA over RSA in my use case because of the significantly shorter signatures. However, I have doubts regarding DSS1 which is basically ... |
How (in)secure is a signature based on DSA with DSS1 (SHA1) in reality? |
I recently tried to send 1536-bit modulus CSR to COMODO. They refused to sign the certificate.<br>
I later found out that it's because NIST mandated 2048-bit modulus on the SSL certificate.
I think it's overkill so maybe I can use smaller private exponent. (which I hope will lessen server load with reduced security m... |
Well, it is certainly possible to generate an RSA public/private key pair like what you're asking about -- I don't know what the OpenSSL API allows you can do, but if you don't restrict yourself to that, well, it is certainly possible to craft such a keypair. You'll come up with a public key with an enormous exponent ... |
Well, it is certainly possible to generate an RSA public/private key pair like what you're asking about -- I don't know what the OpenSSL API allows you can do, but if you don't restrict yourself to that, well, it is certainly possible to craft such a keypair. You'll come up with a public key with an enormous exponent ... |
Double Encryption with RSA scheme? |
What are differences between $E(F_p)$ and $E(Z_p)$? |
While no SHA1 collisions [have been found][1], there are some attacks:
* ~$2^{60}$ collision attack. [Estimated][2] to cost around \$1-2 million currently in the cloud. Possibly economical soon, especially with specialized hardware.
* Intractable preimage attacks like $2^{151}$ [against reduced round variant][3], $... |
This is an exam question:
Suppose that Bob has published an RSA encryption key ke (retaining in secret the corresponding
decryption key kd), and Alice has published a public RSA verification key kv
(retaining in secret the corresponding signing key ks). Alice wants to send an integrity protected
and confident... |
I'm looking into multiplication-homomorphic schemes now and basically I see that there are 3 options: RSA, Boneh-Goh-Nissim and ElGamal.
RSA was proved to be insecure unless message is randomly padded, which action breaks the homomorphic property of the scheme.
Boneh-Goh-Nissim allows for one multiplication, but ... |
This is an exam question in Computer Security course:
Here is the start of a protocol, based on a long-term secret key $k_{AB}$ previously shared between Alice and Bob, designed to offer bilateral authentication and establishment of a session key $k_s$. The session, which begins at message 4, is supposed to be c... |
Commutative Encryption with RSA scheme? |
This is an exam question in Computer Security course:
Here is the start of a protocol, based on a long-term secret key $k_{AB}$ previously shared between Alice and Bob, designed to offer bilateral authentication and establishment of a session key $k_s$. The session, which begins at message 4, is supposed to be confi... |
I've searched some information on ECC, I found that we can use Elgamal cryptosystem with elliptical curve and can we use Menezes-Vanstone cryptosystem with Elliptic Curve . I'm wondering what is the essential difference between the two systems?, and which is better by performance side?
Thank you. |
What differences between Menezes–Vanstone ECC and ElGamal ECC? |
I think OP doesn't know much about crypto we can't just say use this use that without proper explanation.<br>
<br>
I'm not certain but I think I understand what OP really mean.<br>
While OP doesn't know what he should asked; others also answer as everything the question imply.<br>
<br>
OP said 10 __characters__ no... |
I am planning to encrypt the different fields of a database independently, using a symmetric encryption scheme (probably 3DES). Since some of the fields are as small as an integer, may that be problematic? |
Must the ciphertext be longer than the key for symmetric encryption? |
This is an exam question in Computer Security course:
> Here is the start of a protocol, based on a long-term secret key $k_{AB}$ previously shared between Alice and Bob, designed to offer bilateral authentication and establishment of a session key $k_s$. The session, which begins at message 4, is supposed to be con... |
Is there any cryptographic obfuscation scheme that will let me obfuscate a program that reveals my secret, if you reveal yours?
**Formalization.** Let $C(\cdot),V(\cdot)$ be a secure [commitment scheme](https://en.wikipedia.org/wiki/Cryptographic_commitment). In other words, $C(x,r)$ is a commitment to $x$ under r... |
I read about elliptic curve cryptography $E$ over $Z_p$ where $p$ is prime number and $G$ is base point on curve. I noted the points resulting from multiply points eg... $2G$,$3G$,.....,$(N-1)G$ always be positive numbers for $x , y$ and does not contain negative values.
My question . what is the reason for each... |
Why positive values points for elliptic curve? |
If you happen happen to have a message m ∈ Zn \ Z*n, RSA works but not secure. How likely is it going to happen? |n|=1024 bits |p| = 512 bits |q| = 512 bits. |
I am doing a cryptography course via long distance and we have been given an assignment which is based on lattice-based cryptography. I have spent the majority of the past week sifting through papers and videos in an attempt to build my understanding of the subject, but due to the intensely technical manner in which in... |
This is an exam question in Oxford 's Computer Security course:
> Here is the start of a protocol, based on a long-term secret key $k_{AB}$ previously shared between Alice and Bob, designed to offer bilateral authentication and establishment of a session key $k_s$. The session, which begins at message 4, is supposed... |
This is Oxford's computer security exam question:
Suppose that Bob has published an RSA encryption key ke (retaining in secret the corresponding
decryption key kd), and Alice has published a public RSA verification key kv
(retaining in secret the corresponding signing key ks). Alice wants to send an integrity ... |
Choose a public key encryption scheme, where $(s(x||r), p(x||r))$ is a key-pair derived from $x||r$ using a cryptographic hash function.
To make a commitment $C(x, r)$, Alice derives the key-pair and publishes the public key $c = p(x||r)$. If she reveals $x$ then anyone can see if the same key-pair can be derived: $... |
Choose a public key encryption scheme, where $(s(x||r), p(x||r))$ is a key-pair derived from $x||r$ using a cryptographic hash function.
To make a commitment $C(x, r)$, Alice derives the key-pair and publishes the public key $c = p(x||r)$. If she reveals $x$ and $r$ then anyone can see if the same key-pair can be de... |
Choose a public key encryption scheme, where $(s(x||r), p(x||r))$ is a key-pair derived from $x||r$ <strike>using a cryptographic hash function</strike> so that $s(x||y)$ is invertible.
To make a commitment $C(x, r)$, Alice derives the key-pair and publishes the public key $c = p(x||r)$. If she reveals $x$ and $r$ t... |
What does it mean that a protocol realizes "strong mutual authentication"? And What does it mean that a protocol realizes "weak mutual authentication"?
I have googled it but couldn't find anything. |
What does it mean that a protocol realizes "strong mutual authentication"? |
The essential difference between these two encryption schemes is that for standard ElGamal encryption on elliptic curves the plaintext space is the set of points in your elliptic curve group while in Menezes-Vanstone (which can be considered as a variant of ElGamal) the plaintext space is $F_p^*\times F_p^*$ where ... |
Including when $E$ is authenticated encryption (as stated in a comment to the question), there are several issues:
1. Mallory can reshuffle encrypted messages in the session, and intoxicate Bob and Alice with corresponding earlier plaintext messages in the session. For example, in a query/response scenario, using at... |
After researching ECC encryption, I found that we can use ElGamal cryptosystem with elliptic curve and can we use Menezes-Vanstone cryptosystem with elliptic curve. What is the essential difference between the two systems? Which one is better with regards to complexity/performance?
|
I'll assume the obvious: Alice checks $nounce_A$ deciphered from data received at step 2 before proceeding to step 3, and Bob checks $nounce_B$ deciphered from data received at step 3 before proceeding to step 4.
Including when $E$ is authenticated encryption (as stated in a comment to the question), and we suppose ... |
I'll assume the obvious: Alice checks $nounce_A$ deciphered from data received at step 2 before proceeding to step 3, and Bob checks $nounce_B$ deciphered from data received at step 3 before proceeding to step 4.
Including when $E$ is authenticated encryption (as stated in a comment to the question), and we suppose ... |
This is an exam question:
1. $A \to B$: Alice, $nonce_A$
2. $B \to A$: $nonce_B$, $E_{k_{AB}}(nonce_A \| k_1)$
3. $A \to B$: $E_{k_{AB}}(nonce_B \| k_2)$
Alice and Bob both compute $k_s$ = $k_1$ xor $k_2$
4. $A \to B$: $E_{k_s}(...)$
5. $B \to A$: $E_{k_s}(...)$
The protocol is based on a long term secre... |
With public-key algorithms, you don't do encryption and signing of the message using the public-key algorithms themselves. Instead, you use traditional symmetric algorithms for encryption and hash algorithms for signing, then apply the public-key algorithms to those results.
What you're asking for here can actually... |
This is Oxford's computer security exam question:
Suppose that Bob has published an RSA encryption key $ke$ (retaining in secret the corresponding
decryption key $kd$), and Alice has published a public RSA verification key $kv$
(retaining in secret the corresponding signing key $ks$). Alice wants to send an in... |
This is the first part of a multiple parts question:
The authentication protocol ($CREE_0 −nest$) aims at providing mutual authentication between
two principals $A$ (Alice) and $B$ (Bob), using public key cryptography. In addition to Alice and
Bob, there exists at least one other principal M (Malone, or the Man-in-t... |
I read about elliptic curve cryptography $E$ over $Z_p$ where $p$ is prime number and $G$ is a base point on the curve. I noticed the points resulting from multiplication e.g. $2G$,$3G$,.....,$(N-1)G$ are always be positive numbers for $x , y$ and don't contain any negative values.
Whats the reason for these results... |
Why are there only positive value points on an elliptic curve? |
This is the first part of a multiple parts question:
The authentication protocol ($CREE_0 −nest$) aims at providing mutual authentication between
two principals $A$ (Alice) and $B$ (Bob), using public key cryptography. In addition to Alice and Bob, there exists at least one other principal $M$ (Malone, or the "Man-in... |
This is the first part of a multiple parts question:
The authentication protocol ($CREE_0 −nest$) aims at providing mutual authentication between
two principals $A$ (Alice) and $B$ (Bob), using public key cryptography. In addition to Alice and Bob, there exists at least one other principal $M$ (Malone, or the "Man-in... |
I have a question regarding the random k number of ECDSA encryption. As far as I know, it is possible to retrieve k (and thus the private key) from two signed messages if both used the same k. This was done for the PlayStation 3 hack. I'm now trying to reproduce it in Python, using this library: https://github.com/warn... |
I have a question regarding the random k number of ECDSA encryption. As far as I know, it is possible to retrieve k (and thus the private key) from two signed messages if both used the same k. This was done for the PlayStation 3 hack. I'm now trying to reproduce it in Python, using this library: https://github.com/warn... |
When using the RSA cryptosystem, does it still work if you instead encrypt with the private key and decrypt with the public key? What about in the case of using RSA for sender authentication? |
I have a question regarding the random $k$ number of ECDSA encryption. As far as I know, it is possible to retrieve $k$ (and thus the private key) from two signed messages if both used the same $k$. This was done for the PlayStation 3 hack. I'm now trying to reproduce it in Python, using [this library](https://github.c... |
This answer is about trying to make sense [in the context of the rest of the problem] of the fragment:
> _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find it, and explain carefully why it does constitute an attack on the protocol.
I'll assume the unstated but obvi... |
This answer is about trying to make sense [in the context of the rest of the problem] of the fragment:
> _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find it, and explain carefully why it does constitute an attack on the protocol.
I'll assume the unstated but obvi... |
This is the first part of a multiple parts question:
The authentication protocol ($CREE_0 −nest$) aims at providing mutual authentication between
two principals $A$ (Alice) and $B$ (Bob), using public key cryptography. In addition to Alice and Bob, there exists at least one other principal $M$ (Malone, or the "Man-in... |
This answer is about trying to make sense [in the context of the rest of the problem] of the fragment:
> _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find it, and explain carefully why it does constitute an attack on the protocol.
I'll assume the unstated but obvi... |
Is there a length preserving encryption scheme, that preserves the lengths of input sizes such that the length of the input plain text is same as length of the output cipher text ? |
Is there a length preserving encryption scheme? |
I used [rsa-json.native][1] to generate RSA keys for a node.js application that will use [secure-peer][2] later to connect two clients with each other. Now I have 2 questions:
- In [secure-peer/index.js][3] I've found defaultCiphers = ['RC4'] - is this acceptable? I've heard that RC4 is broken.
- Are my example R... |
Are those RSA keys flawed? |
> defaultCiphers = ['RC4'] - is this acceptable? I've heard that RC4 is broken.
About RC4 vulnerabilities in general, see e.g. http://crypto.stackexchange.com/questions/853/google-is-using-rc4-but-isnt-rc4-considered-unsafe
RC4 can be secure when you discard (enough of) the beginning of the keystream or use a new... |
I believe you are being confused by what $k^{-1}$ means. It doesn't mean "interpret $k$ as a real number, plug it into a calculator, and hit the $1/x$ button".
When we use the $k^{-1}$ notation, what we mean to say is that $a = k^{-1}$ is equivalent to saying that $a \times k = 1$.
You will say "doesn't that mea... |
I believe you are being confused by what $k^{-1}$ means. It doesn't mean "interpret $k$ as a real number, plug it into a calculator, and hit the $1/x$ button".
When we use the $k^{-1}$ notation, what we mean to say is that $a = k^{-1}$ is equivalent to saying that $a \times k = 1$.
You will say "doesn't that mea... |
What you need to know is that _all_ equations in this context are, implicitly, understood to be modulo n. That information alone should answer all of your questions, starting with the equation k = (z1 - z2) / (s1 - s2) (modulo N), which hence means k = ((z1-z2) * modular_inverse_mod_n(s1-s2) % n, where I tried to copy ... |
I have a question regarding the random k number of ECDSA encryption. As far as I know, it is possible to retrieve k (and thus the private key) from two signed messages if both used the same k. This was done for the PlayStation 3 hack. I'm now trying to reproduce it in Python, using this library: https://github.com/warn... |
Why are the operations in ∑_(0)^512▒a in a single round operation of SHA-512 has 28,34, and 39 rotations. what does these number of rotations signify? can I change with any random number? |
I've just been skimming NIST's "[Five Confidentiality Modes][1]". I understand those block cipher modes are used to securely encrypt input longer that the block cipher length. However, the common block cipher modes all assume my input length is evenly divisible by my block cipher length.
What is a recommended way to... |
How do I construct variable length input (VIL) in a block cipher mode? |
(Note: This post is not about "rolling my own", but rather trying to deepen my understanding of the underlying structures.)
I'm having difficulties finding clear answers to some questions about the construction of HMACs:
Assuming we have one key for encryption and one key for message integrity checks, and we are ... |
Say that a friend of mine and I have both generated new PGP keys, and we want to use a video call to verify each other's new keys because we live on opposite sides of the planet. While we could both somehow share our public key and then read back the fingerprint, reading a fingerprint is a bit cumbersome, especially gi... |
Say that a friend of mine and I have both generated new PGP keys, and we want to use a video call to verify each other's new keys because we live on opposite sides of the planet. While we could both somehow share our public key and then read back the fingerprint, reading a fingerprint is a bit cumbersome, especially gi... |
How about basing this on radioactive decay?
* You print the message on a film
* Encapsulate the film in some tamper-proof (or highly tamper-resistant) enclosure
* There is only one way to retrieve the film from the enclosure and in that path, put some radioactive material so that you can not retrieve the film w... |
Suppose we have a hash function $H: \{0,1\}^* \mapsto \{0,1\}^n$, that doesn't get all the $n$ length bitstrings as a value for any input, but is otherwise secure. Can that fact be detected?
For example, let $H$ be a secure $n$-bit hash function. You are given a black box function $F$ and told it's either $H$ or $H ... |
How to detect if a hash function doesn't have a full image? |
> In effect, does this mean that a separate HMAC must be created for every single message, i.e. all 16 bytes?
No, you can use HMAC over the whole message with all its blocks.
Of course, that means you can't localize corruption/tampering, so if you were sending a huge message you might want HMAC smaller parts (but... |
How about encoding the data into a laser beam and shooting it out into space in a direction that would have it curve back towards a detector on earth/orbit/moon in 20 years? Kinda like how we know to expect Halley's comet to come around every 75 or so years. |
How about encoding the data into a laser beam and shooting it out into space in a direction that would have it curve back towards a detector on earth/orbit/moon in 20 years? Kinda like how we know to expect Halley's comet to come around every 75 or so years.
I guess the fundamental here is that astral bodies don... |
For a short summary, see [my comment][1].
This over-detailed answer, which in the end I might decide to undelete nevertheless, attempts to make sense [in the context of the rest of the problem] of the fragment:
> _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find i... |
For a short summary, see [my comment][1].
This over-detailed answer, which in the end I might decide to undelete nevertheless, attempts to make sense [in the context of the rest of the problem] of the fragment:
> _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find i... |
I have a question regarding the random $k$ number of ECDSA encryption. As far as I know, it is possible to retrieve $k$ (and thus the private key) from two signed messages if both used the same $k$. This was done for the PlayStation 3 hack. I'm now trying to reproduce it in Python, using this library: https://github.co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.