instruction
stringlengths
15
30k
I am looking to implement the Fortuna algorithm (https://www.schneier.com/fortuna.pdf) on a system with very restrictive memory constraints, using AES-128 as the underlying cipher. As the key size is only 128 bits, using a 256-bit entropy pool hashing algorithm to maintain each pool would seem to be excessive (and a...
Given both Alice and Bob must exchange IP addresses to perform such an operation, what is the most secure way Alice and Bob can exchange public keys between two mobile devices without having to rely on a third-party server or hosted database of a website? And yes, while i understand the key is PUBLIC, my goal is to ...
In the <a href="https://eprint.iacr.org/2006/210.pdf">article</a> *Searchable Symmetric Encryption: Improved Definitions and Efficient Constructions*, Curtmola et al. propose adaptive and non-adaptive (indistinguishability and simulator-based) security definitions for searchable encryption schemes, conventionally ca...
TWO ROUNDS OF SHA256 HMAC?
Considering 'E' an encryption algorithm that transforms a message 'm' into a cryptogram 'c' using a key 'Ke'. So, we have c = E[Ke](m). Analogically, decryption is achieved by m = D[Kd](c). Is that possible to have E=D and Ke <> Kd? Is there any algorithm (public key algorithm, since Ke <> Kd) that does that? Is t...
Is that possible to have E=D and Ke <> Kd?
I've done a lot of reading on how SHA-256, I've found that SHA-256 is irreversible because more data is fed into the hashed string than the hash string contains. But, what if the data that was inputted was equal in size to the string, a string of 64 characters is inputted a string of 64 characters is outputted. Would...
Two rounds of SHA-256 HMAC?
I've done a lot of reading on how SHA-256, I've found that SHA-256 is irreversible because more data is fed into the hashed string than the hash string contains. But, what if the data that was inputted was equal in size to the output string, a string of 64 characters is inputted a string of 64 characters is outputted....
Considering 'E' an encryption algorithm that transforms a message 'm' into a cryptogram 'c' using a key 'Ke'. So, we have c = E[Ke](m). Analogically, decryption is achieved by m = D[Kd](c). Is it possible to have E=D and Ke <> Kd? Is there any algorithm (public key algorithm, since Ke <> Kd) that does that? Is the...
Is it possible to have E=D and Ke <> Kd?
Let us consider $E$ an encryption algorithm that encrypts a message $m$ into a ciphertext $c$ using a key $K_e$. i.e $c = E(m,K_e)$. Similarly, decryption is achieved by $m = d(c,K_d)$. Is there any public key encryption scheme where the encryption process is the same as the decryption process (i.e. $E=D$ ) ?
We are designing an encrypted file system. We plan to use the PCBC (Plaintext Cipher Block Chaining) encryption mode for encryption. This is because we desire the feature ("small changes in the ciphertext would propagate indefinitely when decrypting") in PCBC. However, to our best knowledge, PCBC is not a good choi...
SHA-256 - or any cryptographically secure hash - relies on the internal construction of the hash to have the one-way property. This one-way property is maintained *for any kind and size of input*. However, if the input domain is small enough then it may be able to brute force the hash value. As SHA-256 is not *keyed...
SHA-256 - or any cryptographically secure hash - relies on the internal construction of the hash to have the one-way property. This one-way property is maintained *for any kind and size of input*. However, if the input domain is small enough then it may be able to brute force the hash value. As SHA-256 is not *keyed...
I have read that the Skein hash can be used for quite a few different functions, including a PRNG. Would using the 1024 Skein hash to return 16KB of data be appropriate for a PRNG? Or would it only be appropriate to use the 128 bytes of data as a PRNG?
Let us consider $E$ an encryption algorithm that encrypts a message $m$ into a ciphertext $c$ using a key $K_e$. i.e $c = E(K_e, m)$. Similarly, decryption is achieved by $m = D(K_d, c)$. Is there any public key encryption scheme where the encryption process is the same as the decryption process (i.e. $E=D$ )?
Does anyone know where I might be able to find test vectors for the PRF function in TLS? (either 1.0 or newer). I'm trying to implement a client and I am getting the BAD Record MAC return after sending my encrypted client finished message. I'm pretty sure everything seems to be working so I'm kinda scratching my head w...
I've seen a few questions here on fixed-points in ciphers, most asking about the possibility and existence. Most of the answers however pointed out that **fixed points are not exactly a security threat**. Googling about it didn't fetch me much. All I found was this [book][1], which stated it well but does not go on and...
Fixed-Points in Block-Ciphers- Why not a Vulnerability?
Intuitively, the reason fixed points are not a problem is the same reason that zeros in a one time pad are not. Because the transform is supposed to be random, a ciphertext that looks like plaintext could be that plaintext... or it could be any other plaintext. With proper encryption they are all equally likely. > I...
I've seen a few questions here on fixed-points in ciphers, most asking about the possibility and existence. Most of the answers however pointed out that **fixed points are not exactly a security threat**. Googling about it didn't fetch me much. All I found was this [book][1], which stated it well but does not go on and...
Fixed-points in block ciphers; why don't they indicate a vulnerability?
I want to know how *EXACTLY* the WPA password gets encrypted I have been searching through and I was able to catch: 1.The actual password is converted to some hash 2.Salting is applied to the hash 3.The operation is not reversible 4.The hash comes with the 4-way handshake So what kind of hash is it co...
I want to find out if the Whirlpool hashing algorithm have any weaknesses. There are quite a bit of articles explaining the strengths of this algorithm, but for some reason I cannot find any on its weaknesses...perhaps there aren't any?
How do I create a PKCS#7 or CMS SignedData in python?
What is the point of the initialization vector in cryptographic modes like AES-CBC when it is sent in the public? Cant any attacker just listen and reverse the IV? and as such defeating its purpose?
Whats the point of an IV if public?
In a project we are working on, we have two applications within our datacenter that exchange messages. The messages are protected by an HMAC, and the secret key is stored on a SafeNet device. This is not a hardware token - it is a hardened network storage device called "StorageSecure". The secret key is stored in a Saf...
In a project we are working on, we have two applications within our datacenter that exchange messages. The messages are protected by an HMAC, and the secret key is stored on a SafeNet device. This is not a hardware token - it is a hardened network storage device called "StorageSecure". The secret key is stored in a Saf...
I'm reading ["An Efficient CCA2-Secure Variant of the McEliece Cryptosystem in the standard model" by Rastaghi][1] which states: > As we know, in hybrid PKE schemes XOR alone cannot perfectly hide challenge bit to the CCA2 adversary 1. The author does not define hybrid PKE schemes. What is their definition? 2...
> The author does not define hybrid PKE schemes. What is their > definition? A hybrid public-key encryption scheme is a scheme that uses public-key encryption along with symmetric encryption to gain speed advantages for long messages. The usual instantiation is to simply encrypt a key for the symmetric scheme an...
In a project we are working on, we have two applications within our datacenter that exchange messages. The messages are protected by an HMAC, and the secret key is stored on a SafeNet device. **Update** This is not a hardware token - it is a hardened network storage device called "StorageSecure". The secret key ...
I know that Hardy's work in number theory was used by Clifford Cocks in 1973 to develop the basis for public-key cryptography. What *specifically* was this work, and how is it used today in cryptography?
How did G.H. Hardy's work contribute to today's public-key cryptography?
PHP supports hashing of the [following Tiger algorithms][1]: - tiger128,3 - tiger160,3 - tiger192,3 - tiger128,4 - tiger160,4 - tiger192,4 [wikipedia's entry on Tiger][2] says there's Tiger and Tiger2 and provides samples of Tiger and Tiger2 with 192-bit hashes of "The quick brown fox jumps over the lazy dog...
what is tiger192,4 in PHP?
I want to know how *EXACTLY* the WPA password gets encrypted I have been searching through and I was able to catch: 1. The actual password is converted to some hash 2. Salting is applied to the hash 3. The operation is not reversible 4. The hash comes with the 4-way handshake So what kind of hash is i...
The [Von Neumann](https://en.wikipedia.org/wiki/John_von_Neumann) randomness extractor is explicitly mentioned in the [randomness extractor page](http://en.wikipedia.org/wiki/Randomness_extractor) of Wikipedia, but strangely enough that page does not contain any reference to *whitening* the results of an entropy source...
What means when pgpdump shows this kind of algorithm in the Public-Key Encrypted Session Key Packet? New: Public-Key Encrypted Session Key Packet(tag 1)(126 bytes) New version(3) Key ID - 0xEC661A1CF480AA73 Pub alg - Reserved for Elliptic Curve(pub 18) unknown(pub 18) -> m = sym ...
What means when pgpdump shows this kind of algorithm in the Public-Key Encrypted Session Key Packet? New: Public-Key Encrypted Session Key Packet(tag 1)(126 bytes) New version(3) Key ID - 0xEC661A345473 Pub alg - Reserved for Elliptic Curve(pub 18) unknown(pub 18) -> m = sym alg(...
The [Von Neumann](https://en.wikipedia.org/wiki/John_von_Neumann) randomness extractor is explicitly mentioned in the [randomness extractor page](http://en.wikipedia.org/wiki/Randomness_extractor) of Wikipedia, but strangely enough that page does not contain any reference to *whitening* the results of an entropy source...
What means when `pgpdump` shows this kind of algorithm in the Public-Key Encrypted Session Key Packet? New: Public-Key Encrypted Session Key Packet(tag 1)(126 bytes) New version(3) Key ID - 0xEC661A345473 Pub alg - Reserved for Elliptic Curve(pub 18) unknown(pub 18) -> m = sym al...
PHP supports hashing of the [following Tiger algorithms][1]: - tiger128,3 - tiger160,3 - tiger192,3 - tiger128,4 - tiger160,4 - tiger192,4 [Wikipedia's entry on Tiger][2] says there's Tiger and Tiger2 and provides samples of Tiger and Tiger2 with 192-bit hashes of "The quick brown fox jumps over the lazy dog...
What is tiger192,4 in PHP?
I am reading some articles which explain on the fly signatures (also called online/offine signatures). The principle is that a few operations do not depend of the message we want to sign, so these values can be precomputed and use in the future to sign the message. Let's see an example with the Schnorr signature:...
Can someone make sure I'm creating my Client finished message properly as I've been working at this for days and keep getting a Bad record MAC error and I have no idea what I'm doing wrong. 1. First step is creating the 12 bytes of verify data. This is created using the PRF with the master secret, the label "client ...
What is the point of the initialization vector in cryptographic modes like AES-CBC when it is sent in the public? Cant any attacker just listen and reverse the IV? and as such defeating its purpose? **EDIT** I already know [what has been said here](http://crypto.stackexchange.com/questions/3965/what-is-the-main-...
Can someone make sure I'm creating my Client finished message properly as [I've been working at this for days](http://crypto.stackexchange.com/q/28935/12164) and keep getting a Bad record MAC error and I have no idea what I'm doing wrong. 1. First step is creating the 12 bytes of verify data. This is created using t...
> My question was: Cant any attacker just listen and reverse the IV? and as such defeating its purpose? Yes and no. Yes, an attacker can just listen and read the IV. In CBC mode, the IV is normally transmitted in the clear as the first block, so the attacker doesn't even have to reverse anything. No, as the I...
Let a finite field be $\mathbb{F}_p$, where $p$ is a prime number. I have a fixed value $y$ and two uniformly random values $a$ and $b$. I compute $v=a\cdot y+b$, and send it to the server. The server can do any change to $v$. Assume that I can magically detect if $y$ becomes a uniformly random value. I can do...
Let a finite field be $\mathbb{F}_p$, where $p$ is a prime number. I have a fixed value $y$ and two uniformly random values $a$ and $b$. I compute $v=a\cdot y+b$, and send it to the server. The server can do any change to $v$. Assume that I can magically detect if $y$ becomes a uniformly random value. I can do...
Let a finite field be $\mathbb{F}_p$, where $p$ is a prime number. I have a fixed value $y$ and two uniformly random values $a$ and $b$. Hypothesis: $a,b,y,v \neq0$ ------------------------------------ I compute $v=a\cdot y+b$, and send it to the server. The server can do any change to $v$. Assume that I can ...
I'm not a cryptograhpy expert, I am a web developer trying to determine the origin of a Wordpress blog hack, and how likely it is that it was brute forced. The administrator account username had been changed from the default "admin" and the password was, I believe, 8-10 characters comprising mixed case alphanumeric ...
How long does it take to brute force a Wordpress password?
Most of the sources say [McEliece](https://en.wikipedia.org/wiki/McEliece_cryptosystem) has never gained acceptance because of its large size of private and public keys. However I have never heard about the size (or length) of its ciphertext. (["Ciphertext expansion"](https://en.wikipedia.org/wiki/Ciphertext_expansi...
Most of the sources say [McEliece](https://en.wikipedia.org/wiki/McEliece_cryptosystem) has never gained acceptance because of its large size of private and public keys. However I have never heard about the size (or length) of its ciphertext. (["Ciphertext expansion"](https://en.wikipedia.org/wiki/Ciphertext_expansi...
How are used ECDH and ECDSA in combination with public key ? Usually these methods are used for establish a secret themselves, so why (and how) are used combined with public and private key couple in PGP?
The following snapshot of the algorithm is taken from the book Guide to Elliptic Curve Cryptography published by Springer 2004. [![enter image description here][1]][1] I don't understand that why at the statement 9.1 if both $T_1$ and $T_2$ are zero, then the double is computed? Why they are doing so in a point addi...
Could someone explain the given algorithm?
How are used ECDH and ECDSA in combination with public key ? Usually these methods are used for establish a secret themselves, so why (and how) are used combined with public and private key couple in PGP? RFC-6637 says: The method is a combination of an ECC Diffie-Hellman method to establish a shared sec...
How are used `ECDH` and `ECDSA` in combination with public key ? Usually these methods are used for establish a secret themselves, so why (and how) are used combined with public and private key couple in OpenPGP? `RFC-6637` says: The method is a combination of an ECC Diffie-Hellman method to establish a ...
I'm a crypto-enthusiast but no expert at all, that'll explain why i didn't understand. Also please consider english isn't my native language :) I am about to enable FileVault2 FDE on the new macbook of my users. I checked how it worked and my conclusions are : user pw --> PBKDF2 --> DEK --> unwrap KEK --> unwrap...
How does FileVault2 Recovery actually work?
Let a finite field be $\mathbb{F}_p$, where $p$ is a prime number. I have a fixed value $y$ and two uniformly random values $a$ and $b$. Hypothesis: $a,b,y,v \neq0$ ------------------------------------ I consider the server as an attacker who may modify the value $v$. The change to value $v$ may apply a cle...
I'm developing a bootloader for an embedded device, with which it should be possible for customers (i.e. device owners) to update the device's firmware. It is required that: 1. the firmware is distributed encrypted 2. the firmware's integrity is protected 3. the firmware is authentic, meaning that it was rel...
How to enforce data privacy, integrity and authenticity of distributed firmware images for an embedded device?
Let's $\mathbb{F}_p$ be a finite field where $p$ is a large prime number(e.g. 256-bit) I know if the probability that an element picked from the field is $\frac{1}{p-1}$ we say the element is picked uniformly at random. **Question**: In security context can we say the element is uniformly at random even if its p...
I am not a cryptography expert, but I need a library that implements threshold cryptography. The idea is to use the technique in a replicated system implemented in Java. So far, I have only found [ThresSig][1] and a ECDSA implementation used in [TwoFactorBtcWallet][2]. However, ThresSig is based on a 15-years old sc...
Threshold signature's library/implementation/package?
Let's take a set with $p$ uniquely defined elements. A uniformly random distribution is that every element has a chance $1/p$ to be picked. What if the last element is never picked and the rest are with an uniform probability of $(p-1)^{-1}$? If you see $k$ items you expect to see the last one with probability $1-(1...
I am not a cryptography expert, but I need a library that implements threshold cryptography. The idea is to use the technique in a replicated system implemented in Java. So far, I have only found [ThresSig][1] and a ECDSA implementation used in [TwoFactorBtcWallet][2]. However, ThresSig is based on a 15-years old sc...
Threshold signature library: Shoup's Practical Threshold Signatures?
We have an application where we would like to store "encrypted" data points (as in, not being able to know the original - plaintext - data just by looking at the stored - encrypted - version of it) but still be able to ask the running system for all data points up to a certain *distance* from a given point. We don't wa...
Is it possible to encrypt two data points but still be able to compute distance between them?
I'm not a cryptograhpy expert, I am a web developer trying to determine the origin of a Wordpress blog hack, and how likely it is that it was brute forced. The administrator account username had been changed from the default "admin" and the password was, I believe, 8-10 characters comprising mixed case alphanumeric ...
Is it possible to encrypt data points but still be able to select the ones "near" a given value?
How are used `ECDH` and `ECDSA` in combination with public key ? Usually these methods are used for establish a secret themselves, so why (and how) are used combined with public and private key couple in OpenPGP? **RFC-6637** says: > The method is a combination of an ECC Diffie-Hellman method to establish a share...
> That means a plaintext of length 524 will be encrypted to a ciphertext of length 1024 and then will be sent. Isn't is also an inefficiency? Not really; or at least, that's not an inefficiency we care about. A length of 1024 means, in this context, 1024 bits (or 128 bytes). This compares favorably to RSA (for w...
There is an [article][1] about the provided security of the CryptDB. The simple questions that challenge the security 1. Where is the row integrity? 2. Where is the completeness of the query results? 3. Where is the freshness of the data? 4. Where is the Authentication of the data? 5. What is the cost o...
I have two questions for Clarification for AE mode choice criteria - GCM : it appears to be actually the most popular and widely used AE mode of operation. however it is also well-known to be highly sensitive (more than other AE modes ?) to IV uniqueness requirement and completely fails if such requirement is not r...
I'm having a rough time understanding the math behind elliptic curves.<br> I want to implement **ECDH** where user can define **a, b,** and **p** parameters of elliptic curve. How can I calculate generator base point **G**? Is it any point that satisfies elliptic curve equation $ y^2 (\bmod p) = x^3 + ax + b (\bmod...
We have an application where we would like to store "encrypted" data points (as in, not being able to know the original - plaintext - data just by looking at the stored - encrypted - version of it) but still be able to ask the running system for all data points up to a certain *distance* from a given point. We don't wa...
We have an application where we would like to store "encrypted" data points (as in, not being able to know the original - plaintext - data just by looking at the stored - encrypted - version of it) but still be able to ask the running system for all data points up to a certain *distance* from a given point. We don't wa...
[This question][1] both describes the SRP-Z variant and mentions that the patent should expire in three years. I think the patent in question is this one, but I'm not sure: [US 6539479][2]. If it is, it seems to actually have expired earlier this year due to non-payment of fees. Looking it up on the [USPTO PAIR][3] ...
This question is related to **data integrity**. Let a finite field be $\mathbb{F}_p$, where $p$ is a prime number. I have a fixed value $y$ and two uniformly random values $a$ and $b$. Hypothesis: $a,b,y,v \neq0$ ------------------------------------ I consider the server as an attacker who may modify th...
What is the hardness in Decisional Linear Assumption (DLIN)?
I am planning to use threshold cryptography in a Java application. So far, I have only found [ThresSig][1] and a ECDSA implementation used in [TwoFactorBtcWallet][2]. However, ThresSig is based on a 15-years old scheme, Shoup's Practical Threshold Signatures, and I can't figure out how to re-use the aforementioned ECDS...
Is Shoup's Practical Threshold Signatures considered secure?
I would like to know is any encryption algorithm with variable input variable output with out any padding?For example if i give 16(17,18,67,117,..any size) bit palintext my cipher text also with 16(17,18,67,117,..any size) bit only !!
I would like to know if there is any encryption algorithm with variable input variable output with out any padding? For example if I give 16(17,18,67,117,..any size) bit plaintext, my ciphertext is also 16(17,18,67,117,..any size) bits.
Variable length variable output encryption with out any padding?
This question is related to **data integrity**. Let a finite field be $\mathbb{F}_p$, where $p$ is a prime number. I have a fixed value $y$ and two uniformly random values $a$ and $b$. Hypothesis: $a,b,y,v \neq0$ ------------------------------------ I consider the server as an attacker who may modify th...
I am not a beginner in crypto, but not that far from it, so please be gentle. I look after a web server app that I generated the SSL certificate for, and I used an RSA public/private keypair. When connecting to the web app via firefox 40.0.3, it doesn't let me, with Error code: ssl_error_weak_server_ephemeral_dh_...
If my server utilises an RSA based certificate, why does firefox think I am using Diffie Hellman?
This may sounds wired: What if I don't let others know my public key, then use private key to encryt, and then use public key to decrypt? does it secure?
Is it secure to use RSA private key encrypt and public key to decrypt?
This may sound weird: What if I don't let others know my public key, then use my private key to encrypt, and the public key to decrypt? Is this secure?
RSA: Is it secure to use the private key to encrypt and the public key to decrypt?
I learned about PIN variant from this online blog.... https://www.parthenonsoftware.com/blog/how-to-decrypt-magnetic-stripe-scanner-data-with-dukpt/ > BDK and KSN are used to derive a transaction key which is unique for that session. The are unique because KSN is updated after each transaction. Once this key is d...