instruction
stringlengths
15
30k
What is the difference between "securely realizes" and "securely implements"?
In some security proofs it is stated that "a protocol securely **realizes** an ideal functionality" while in some others "a protocol securely **implements** an ideal functionality". 1. Is there a meaningful difference or it is just another verb to say a similar thing? 2. Also, is there any difference between...
In the ideal world, $A$ sends several inputs $x_1,...,x_\lambda$ to the functionality and $B$ sends input $y$. Functionality sends $f(x_1,y),...,f(x_\lambda,y)$ to $A$ and nothing to $B$. Suppose that we have a protocol which is secure against semi-honest adversaries to realize this functionality. In this protoc...
Can several run of a semi-honest protocol be used to infer malicious security?
>More generally, is it necessary to force the malicious party to act honestly is each intermediate step or it is sufficient to force him to output correctly? Detection of malicious behavior can occur at the end. It does not have to happen at each intermediate step. >Is it possible for A to choose $x_i$s in a way ...
In the ideal world, $A$ sends several inputs $x_1,...,x_\lambda$ to the functionality and $B$ sends input $y$. Functionality sends $f(x_1,y),...,f(x_\lambda,y)$ to $A$ and nothing to $B$. Suppose that we have a protocol which is secure against semi-honest adversaries to realize this functionality. In this protoc...
If I understand the question right, what you are looking for is a **fair** secret sharing protocol. Most secret sharing protocols are unfair. For example, in 3-out-of-4 secret sharing with 2 dishonest parties, once one honest party broadcasts their share, the two dishonest parties can privately collude to reconstruct t...
In some security proofs it is stated that "a protocol securely **realizes** an ideal functionality" while in some others "a protocol securely **implements** an ideal functionality". 1. Is there a meaningful difference or it is just another verb to say a similar thing? 2. Also, is there any difference between...
In some security proofs it is stated that "a protocol securely **realizes** an ideal functionality" while in some others "a protocol securely **implements** an ideal functionality". 1. Is there a meaningful difference or it is just another verb to say a similar thing? 2. Also, is there any difference between...
In this paper of J. Baron, et al. [(PDF)][1], simulator always aborts the ideal functionality before client outputs its pattern-matching result obtained from the ideal functionality. (See bottom of page 30, and top of page 33) My questions are: 1. Why should simulator always abort? 2. While simulator always a...
Adding some more information to fkraiem's answer: The encryption in the [Rabin cryptsystem](https://en.wikipedia.org/wiki/Rabin_cryptosystem) is basically textbook RSA with an exponent of $2$. >1) Neither p nor q are equal to 2. This means they are odd. The product of (p−1)(q−1) would be even i.e. not coprime wit...
I am currently trying to implement the pathORAM algorithm as describe in this paper: https://eprint.iacr.org/2013/280.pdf What is the expected behavoir of the stash? Even after a couple million calls is there an upper bound to it?
I am currently trying to implement the pathORAM algorithm as describe in this paper: https://eprint.iacr.org/2013/280.pdf The paper states that with high probability, the stash size will be bounded by some R. Is there a way to know what this R will be? Additionally, is there an intuitive way to understand why it ...
I came across this article from 2 years ago: http://www.dailymail.co.uk/sciencetech/article-2331984/Think-strong-password-Hackers-crack-16-character-passwords-hour.html They're describing how a team of "hackers" cracked passwords such as this "qeadzcwrsfxv1331" or this "Qbesancon321" in just a few hours. How is that...
Cracking passwords with more than 10 characters in a few hours?
I have created a RSA encryption/decryption program but how do i write out the results after doing a encryption? Right now I have it so that it will just print out the decimal value of one character after encrypting then a space and the next value. Example: Public Key: (143, 17) Message: hello En...
I've been looking over the HKDF specs ([RFC 5869](https://tools.ietf.org/html/rfc5869)), and something I noticed is that in the `key` and `salt` are reversed: 2.2. Step 1: Extract HKDF-Extract(salt, IKM) -> PRK Options: Hash a hash function; HashLen denotes the length of the ...
Despite the fact that Marsaglia's MWC PRNG (multiply-with-carry random number generator) is considered to be *"the mother of all RNGs"*, it does not seem to be considered to be a CSPRNG (cryptographically secure pseudo-random number generator) even though it passes several statistical randomness tests, including *ENT* ...
> To me it seems like `HMAC(salt, IKM)` would be weaker against a brute force search of `IKM`s, as the digest of the `salt` can in this case be precalculated by an attacker (assuming the `salt` is a non-secret value or zero). Yes, it is slightly faster to brute force, but if the IKM does not have enough entropy to g...
I've been looking over the HKDF specs ([RFC 5869](https://tools.ietf.org/html/rfc5869)), and something I noticed is that in the `key` and `salt` are reversed: 2.2. Step 1: Extract HKDF-Extract(salt, IKM) -> PRK Options: Hash a hash function; HashLen denotes the length of the ...
Why does HKDF use HMAC(salt, key) instead of HMAC(key, salt)?
Secure Multiparty Computation based on Samir Secret sharing methods rely on Polynomials. Imagine corpus of data should be outsourced to bunch of untrusted servers for any computations. Now the data could be split by a trusted client using Secret Sharing and distributed among the multiple untrusted servers. Subsequently...
How many polynomials are used in Secure Multiparty Computation?
I am writing a paper on RSA, and I am calculating some encryption running times. I have been told that the encryption running time is O(n^2) where *n* is the modulus. I have also been told that there is a constant C such that O(Cn^2) where C relates to the machine used? Does anyone have any idea where to find this C fo...
Suppose we have a single, fixed plaintext block $p$ of 128 bits. Call the set of all possible 128 bit blocks $B$. We could define fixed plaintext AES-128 as a function $f(k) \to B$ that takes a 128 bit key $k$ and outputs a 128 bit ciphertext block $c$. As far as I know, AES-128 is a bijective function in this ma...
Are there key collisions in AES-192, AES-256?
Suppose we have a single, fixed plaintext block $p$ of 128 bits. Call the set of all possible 128 bit blocks $B$. We could define fixed plaintext AES-128 as a function $f(k) \to B$ that takes a 128 bit key $k$ and outputs a 128 bit ciphertext block $c$. As far as I know, AES-128 is a bijective function in this ma...
Are their any specific requirements for the IV when using Salsa20? Is it for example allowed to re-use the same IV when encrypting with the same session key? Should the IV be random? etc I tried to find some information in the related Salsa20 paper, but I could not really find any mentions of specific Salsa20 IV...
In the [EdDSA for more curve paper][1] the authors defines: Keys ---- >An EdDSA secret key is a $b$-bit string $k$. The hash $H(k) = (h_0, h_1, ... , h_{2b−1})$ determines an integer $s = 2^n+\sum_{c≤i<n} 2^ih_i$ , which in turn determines the multiple $A = sB$. The corresponding EdDSA public key is $A$. Note...
Studying the basics of Diffie-Hellman key exchange, I'm stuck at a basic operation used in the end of the key exchange (where you show that both computations actually are the same). Can someone explain this step in detail? (g^a mod p)^b mod p = (g^a)^b mod p Where p is a prime and g is the primitive root to p...
If that's true, wouldn't that mean you can crack multiple 7z files at very little extra cost?
Is it true that 7zip doesn't use any salt with its KDF?
If that's true, wouldn't that mean you can crack multiple 7z files at very little extra cost? I saw this issue here: https://github.com/magnumripper/JohnTheRipper/issues/1679
**How they work** Public and private keys work as follows. Every party who wants to communicate with others generates a private key which they keep secret. From that private key, they derive a public key, which they publish for anyone to see. For example, if we have three agents, Alice, Bob, and Charlie, they wil...
Your requirements are not particularly clear. What do you *mean* that "the coin is flipped by only Alice and Bob"? This doesn't have any particular meaning – a coin is a device generating a random value in the set `{0, 1}`. This value is ideally truly random; it does not depend on Alice or Bob's luck or skill. As su...
I am writing a paper on RSA, and I am calculating some encryption running times. I have been told that the encryption running time is $O(n^2)$ where $n$ is the modulus. I have also been told that there is a constant $C$ such that $O(Cn^2)$ where $C$ relates to the machine used. Does anyone have any idea where to ...
Find a constant $C$ in $O(Cn^2)$?
I started learning streams ciphers with the use of LFSRs. Therefore, I tried to simulate what I am learning in a code in C language which combines three registers and XOR with function X to get stream keys but I couldn't find examples or resources which illustrate the same thing to help me to do so. So any guidelines w...
I'm basically a crypto noob (and not an english native), so please be indulgent :) I thought about if you could realize an eVoting system with bitcoin. I see 2 major requirements: 1. each citizen can only vote once 2. votes musn't be traceable I imagined the government could give each citizen a private ...
I started learning streams ciphers with the use of LFSRs. Therefore, I tried to simulate what I am learning in a `C` sourcecode, which combines three registers and XOR with function $X$ to get stream keys – but I couldn't find examples or resources which illustrate the same thing to help me do so. Are there any gui...
References for combining LFSRs with different lengths and taps?
I'm going to provide 'proof' why a hash function can be reversed, and I hope you can tell my why I'm wrong So, a hash function can be implemented as a series of logic gates. All logic gates can be implemented using only NOT and OR gates. <sup><sub>I'm fairly sure about both of these, but please correct me if I'm wro...
Why can't I reverse a hash to a possible input?
I'm going to provide 'proof' why a hash function can be reversed, and I hope you can tell my why I'm wrong So, a hash function can be implemented as a series of logic gates. All logic gates can be implemented using only NOT and OR gates. <sup><sub>I'm fairly sure about both of these, but please correct me if I'm wro...
I'm going to provide *“proof”* why a hash function can be reversed, and I hope you can tell my why I'm wrong So, a hash function can be implemented as a series of logic gates. All logic gates can be implemented using only `NOT` and `OR` gates. (I'm fairly sure about both of these, but please correct me if I'm wrong....
Crypto noob here. I have an application that has only moderate security requirements (internal use, limited audience). I want to send a unique url with a token in it to each user. If anyone has the url, they can submit information on the user's behalf. Can I just hash their email with a secret salt to produce the s...
Hash email address with a non-random salt for moderate security?
> What have I gotten wrong here? Well, it seems as if you forgot (or simply ignored) that 99.9% of all hash functions out there include a ***compression*** step, which is not only hard to reverse (unless someone messed up the hash function design really badly) but also prevents reconstructing the original input. All...
> What have I gotten wrong here? Well, it seems as if you forgot (or simply ignored) that 99.9% of all hash functions out there include a ***compression*** step, which is not only hard to reverse (unless someone messed up the hash function design really badly) but also prevents reconstructing the original input. All...
From a cryptographic standpoint a MAC would be perfect (e.g. `HMAC-SHA256(strong secret key, email)`). As long as no-one knows your secret key it is infeasible to find a token for another mail. One thing you will probably have to handle is: What happens when someone changes their email? What if someone resubmits the...
You could embed a plain expiry timestamp (e.g. one hour) along with the URL. Then, compute the MAC of concatenating the expiry timestamp and the email. For example: /submit? m=user@mail.com& User email e=1447271022& Expiry timestamp t=54fffd55b...
You could embed a plain expiry timestamp (e.g. current time + one hour) along with the URL. Then, compute the MAC of concatenating the expiry timestamp and the email. For example: /submit? m=user@mail.com& User email e=1447271022& Expiry timestamp ...
Assuming no databases are involved, you could embed a plain expiry timestamp (e.g. current time + one hour) along with the URL. Then, compute the MAC of concatenating the expiry timestamp and the email. For example: /submit? m=user@mail.com& User email e=1447271022& ...
Is there a difference in terms of security between 1. An encrypted stream of bits obtained by encrypting a plaintext concatenated with it's signature $ C = E_k(plaintext||\sigma)$ where $E$ is a symmetric or asymmetric encryption function, II is a concatenation operator and $\sigma=h(plaintext)^k$ ...
Is there a difference in terms of security between 1. An encrypted stream of bits obtained by encrypting a plaintext concatenated with it's signature $ C = E_k(plaintext||\sigma)$ where $E$ is a symmetric or asymmetric encryption function, II is a concatenation operator and $\sigma=h(plaintext)^k$ ...
Is there a difference in terms of security between 1. An encrypted stream of bits obtained by encrypting a plaintext concatenated with it's signature $ C = E_k(plaintext||\sigma)$ where $E$ is a symmetric or asymmetric encryption function, II is a concatenation operator and $\sigma=h(plai...
How do I check if the secret key polynomial of the ATV-FHE (NTRU based) scheme is invertible?
When I look at Google's Public Key in Firefox I get > PKCS #1 SHA-256 With RSA Encryption Yet according to SSL Labs Google has > EC 256 bits / SHA256withRSA and supports > TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 How can it when the public key it uses is RSA not a Elliptic Curve one? Does Google presen...
I'm designing a cryptography-breaking assignment for a college-level introductory security course, and I'm looking for a hash function which is reasonably easy (but not too easy) to generate collisions for. The assignment is that the students are given a hash table implementation which uses such a function, and their t...
We're implementing a mobile application which communicates with a web service, and on first install the user sends its deviceid to the web service (over TLS, unauthenticated at this point) - which determines if the user's device is known to our system. If the device is not known, the user must authenticate with a usern...
Is a nonce considered 'secret' enough for HMAC?
I'm designing a cryptography-breaking assignment for a college-level introductory security course, and I'm looking for a hash function which is reasonably easy (but not too easy) to generate collisions for. The assignment is that the students are given a hash table implementation which uses such a function, and their t...
Consider a text with $n$ words which $m$ words of it can be replaced with an equivalent word. Therefore we have $2^m$ different texts with the same meaning. For example "You are {so/very} {keen/eager}" has 4 different combinations with the same meaning. Is it reasonable and possible to use this property for messa...
Is it possible to have self-authenticated message?
I am working on a new protocol for pattern matching. While defining the ideal functionality, it is possible to say: 1. Alice sends $p$ and Bob sends $T$ to the ideal functionality. i.e. searching for one pattern. 2. Alice sends $p_1,\dots,p_\lambda$ and Bob sends $T$ to the ideal functionality. i.e. searching for...
Proving for a single input vs several inputs. Is there any difference?
What is the DK function when generating an AES key?
What is the DK function when generating an AES key for Kerberos 5?
I saw there are RSA encryption versions ,as follows, . RSA encryption version 1.5(RFC 2313) . RSA cryptography specification version 2.0(RFC 2347) . RSA cryptography specification version 2.1(RFC 3447) I am really curious why doesn't RFC have RSA version 1.0 ?
Besides using a certificate to defend against a man in the middle attack during a key exchange, what methods can be used?
How to protect against a Man In The Middle attack during key exchange without using certificates?
This isn't an answer, but is too long for a comment. I pray the Stackexchange Purity Gods will forgive me. Imagine a simple hash function. Like take one I've seen used to hash strings when building a dictionary: add up the ASCII or Unicode values of all the characters and take the remainder modulo some fairly large ...
I saw that there are three RSA encryption versions, as follows: * RSA encryption version 1.5 ([RFC 2313](https://tools.ietf.org/html/rfc2313)) * RSA cryptography specification version 2.0 ([RFC 2347](https://tools.ietf.org/html/rfc2347)) * RSA cryptography specification version 2.1 ([RFC 3447](https://tools.ietf.o...
Why is RSA encryption version 1.0 not specified in an RFC?
Besides using a certificate to defend against a man in the middle attack <br> during a key exchange, what methods can be used?
How can one protect against a Man In The Middle attack during key exchange without using certificates?
If PRF is non invertible, why does Ctr-mode work?
A mathematically elegant and rather simple way of hashing are the parity bits of a Hamming code, as small changes in the data will yield different parity bits. You can weakly hash 4-bit strings to 3-bit strings with the standard (7,4) Hamming code, but the general Hamming code construction has high enough rate that you...
Where can i get the correct and precise algorithms for elliptic curve cryptography operations?
A mathematically elegant and rather simple way of hashing are the parity bits of a Hamming code, as small changes in the data will yield different parity bits. You can weakly hash 4-bit strings to 3-bit strings with the standard (7,4) Hamming code, but the general Hamming code construction has high enough rate that you...
Where can I get the correct and precise algorithms for elliptic curve cryptography?
> Why can't I reverse a hash to a possible input? Actually, you could. Just don’t expect the result of your reversal to be the same as the “original input”. Furthermore you should be aware of the fact that, depending on the type of hash and depending on the cryptographical security of its design, reversing the ha...
> Why can't I reverse a hash to a possible input? Actually, you could. Just don’t expect the result of your reversal to be the same as the “original input”. Furthermore you should be aware of the fact that, depending on the type of hash and depending on the cryptographical security of its design, reversing the ha...
> Why can't I reverse a hash to a possible input? Actually, you could. Just don’t expect the result of your reversal to be the same as the “original input”. Furthermore you should be aware of the fact that, depending on the type of hash and depending on the cryptographical security of its design, reversing the ha...
> Why can't I reverse a hash to a possible input? Actually, depending on the individual hash and explicitly ignoring all computational feasability issues, you could. Just don’t expect the result of your reversal to be the same as the “original input”. Furthermore you should be aware of the fact that, depending on...
> Why can't I reverse a hash to a possible input? Actually, depending on the individual hash and explicitly ignoring all computational feasability issues, you could. Just don’t expect the result of your reversal to be the same as the “original input”. Furthermore you should be aware of the fact that, depending on...
> Why can't I reverse a hash to a possible input? Actually, depending on the individual hash and explicitly ignoring all computational feasability issues, you could. Just don’t expect the result of your reversal to be the same as the “original input”. Furthermore you should be aware of the fact that, depending on...
Cryptanalysis to reverse engineer a hash?
This might be out of ignorance, I apologize, but how complex of a problem might it be to *generate* a file of size $N$ whose MD5SUM is $X$? For example, ls -l wczasp.rb -rwxrwxrwx 1 master master 7273877 2011-01-30 17:13 wczasp.rb md5sum wczasp.rb acf3602b5eb9a2db3e365d3043682faf w...
Computational feasable to reverse MD5SUM?
> Why can't I reverse a hash to a possible input? Actually, depending on the individual hash and explicitly ignoring all computational feasability issues, you could. Just don’t expect the result of your reversal to be the same as the “original input”. Furthermore you should be aware of the fact that, depending on...
> Why can't I reverse a hash to a possible input? Actually, depending on the individual hash and explicitly ignoring all computational feasibility issues, you could. Just don’t expect the result of your reversal to be the same as the “original input”. Furthermore you should be aware of the fact that, depending on...
Computational feasible to reverse MD5SUM?
I am designing a set of low-power sensing motes. Each mote will communicate to a central base over RF. I want the mote to be able to authenticate itself with the base, and send its data without being vulnerable to replay attacks while not using a lot of processing power. Are there major flaws in the following alg...
Why is RSA encryption key based on modulo $\varphi(n)$ rather than modulo $n$?
Given an n-bit cryptographic hash function $H$, how many messages should we expect to hash before finding a message $x$ such that $H(x) < 2^{n−k}$ for some integer k? My take: Shouldn't it simply take on average $2^{n-k}/2$ to find the hash?
How many Hashes to find a digest of 2^{n−k}?
Are there any hash outputs not produced by the MD5 hash function? I need to use it as a placeholder for an empty hash while comparing two hashes.
You don't really need to authenticate the base to the mote before transmission to ensure confidentiality, since the data will be encrypted to its key. The real reason you need it is to prevent an attacker from tricking the mote into thinking it's reported already and causing data loss. To prevent replay, storage is fu...
In recent crypto there has been a trend to design ciphers using only the [ARX set of instructions][1] - i.e. additions (modulo 2^32 or 2^64), rotations (by a fixed constant) and XORs, examples include [Threefish][2], [Salsa20 and ChaCha20.][3] One of the nicer, claimed properties of such ciphers is that they are sup...