instruction
stringlengths
15
30k
What is the meaning of probabilistic encryption algorithm?
> So I'm trying to find a method of encryption that not only obfuscates text, but also compresses the result. > For example, if I encrypted **`ninechars`**, the ideal result would be **less than nine characters**. Even *without* encryption, it's not possible for [a reversible data compression scheme](https://en.wik...
SSL/TLS is a secure protocol that encorporates the negotiation of cryptographic parameters for asymmetric and symmetric algorithms, integrity algorithms, and verification algorithms. You can read more about this on [How does TLS work?][1] You can find more information on the cipher suites used for negotiations in thi...
SSL/TLS is a secure protocol that encorporates the negotiation of cryptographic parameters for asymmetric and symmetric algorithms, integrity algorithms, and verification algorithms. You can read more about this on [How does TLS work?][1] You can find more information on the cipher suites used for negotiations in thi...
I need to generate a hash for a small piece of data (~50 bytes). I'd normally use MD5 or SHA but that's not available in the platform I'm programming for. Luckily, it provides Triple DES and I thought I could use it as cryptographic hash function (pseudo-code): function MyHash(text) data = padded(te...
A lot of definitions for semantic security make use an experiment $\text{Exp}$ which is performed between a challenger $\mathcal{C}$ and an adversary $\mathcal{A}$ that begins as follows: $\mathcal{C}$ generates a random key w.r.t. the considered cryptosystem and a given security parameter. $\mathcal{A}$ selects two...
My password manager lets me choose an algorithm from the list below in order to encrypt my password database: **Microsoft Base Cryptographic Provider v1.0:** - RC2-128 - RC4-128 - DES-56 - 3DES TWO KEY-112 - 3DES-168 **Microsoft Enhanced Cryptographic Provider v1.0:** - RC2-128 - RC4-128 - DES...
What encryption algorithm is the most secure to encrypt my password database?
I understand that bigger ciphers show more recurring patterns and therefore should be easier (or at least faster) to decrypt as you'll have a better statistical analysis, being However if we use a evenly grown key, would this still be true? I've been wondering as I'm trying to decrypt a Vigenére cipher which seem...
I currently need to encrypt large files (video, over 6 Gbytes) for our customers. To ensure authenticity and integrity, we chose HMAC-256 as we already use it in our internal messaging system. But working in embedded systems, we are limitted by the memory. If the message is the whole data file, we could not store...
My password manager lets me choose an algorithm from the list below in order to encrypt my password database: **Microsoft Base Cryptographic Provider v1.0:** - RC2-128 - RC4-128 - DES-56 - 3DES TWO KEY-112 - 3DES-168 **Microsoft Enhanced Cryptographic Provider v1.0:** - RC2-128 - RC4-128 - DES...
The password manager I use lets me choose an algorithm from the list below in order to encrypt my password database: **Microsoft Base Cryptographic Provider v1.0:** - RC2-128 - RC4-128 - DES-56 - 3DES TWO KEY-112 - 3DES-168 **Microsoft Enhanced Cryptographic Provider v1.0:** - RC2-128 - RC4-128 ...
What is the most secure encryption algorithm to encrypt my password database?
Previously posted [here][1]. Someone suggested I could post it here to get some answers. I am trying to solve a CTF challenge, [here][2]. Basically we're given message and key inputs to a cipher and its resulting ciphertext. We're then given a encrypted message we have to decrypt. I started trying to reverse eng...
I currently need to encrypt large files (video, over 6 Gbytes) for our customers. To ensure authenticity and integrity, we chose HMAC-256 as we already use it in our internal messaging system. But working in embedded systems, we are limitted by the memory. If the message is the whole data file, we could not store...
I am trying to figure out how the HMAC SHA-256 hashing algorithm works. I know that we have to use the following: H (K ^ opad)|| H ((K ^ ipad)|| text)). The problem that I am facing is I think of basic understanding of the above. As far as I know, SHA-256 takes in *“character input”*. The key that I am using ...
Using a format preserving encryption scheme that uses AES internally as its block cipher, for a plaintext that I encrypt I want to use that input plaintext as the key. However using AES-128, my keysize is required to be 128 bit. But i cannot guarantee my plaintext to be exactly this length - they are words or num...
How to generate the key for AES from a plaintext that can be smaller or larger than the acceptable keysize?
I'm designing an open ioT protocol to be used on ioT boards based on Texas Instruments RF-based MCUs. These MCUs have an AES module to easily encrypt and decrypt AES content, so that's why I choose a symmetric key algorithm rather than a public key one (also, RSA would need licensing). So, obviously, there are some pro...
Using a format preserving encryption scheme that uses AES internally as its block cipher, for a plaintext that I encrypt I want to use that input plaintext as the key. However using AES-128, my keysize is required to be 128 bit. But i cannot guarantee my plaintext to be exactly this length - they are words or num...
How to prove knowledge of discrete logarithm in a product?
Imagine if Alice encrypts message to Bob (using public key P_bob) and then Bob encrypts the same message to Carol (using P_carol). Is there a way for Bob to prove that: 1. P_carol was indeed used 2. Message is still the same that Alice passed to Bob. *Note1: Both ciphertexts and public keys are visible for eve...
Is there a way to prove equality of plaintext that was encrypted using different public keys?
How compromise the privacy of the messages encrypted of NaCl, when nonce used more than once?
How to compromise the privacy of NaCl encrypted messages, when nonce is reused?
How are memory hard functions designed for the purpose of password based key derivation? To protect against a brute force attack from a parallel machine. What design could work well with Skein? The [Skein paper][1] (pdf) has a time hard PBKDF (basically hashing the password repeat very many times) but not a memory h...
Memory hard password based key derivation functions?
Imagine if Alice encrypts message to Bob (using public key $P_{bob}$) and then Bob encrypts the same message to Carol (using $P_{carol}$). Is there a way for Bob to prove that: 1. $P_{carol}$ was indeed used 2. Message is still the same that Alice passed to Bob. *Note1: Both ciphertexts and public keys are vis...
The j-invariants classify the elliptic curves up to isomorphisms (if we suppose to work in the algebraic closure). Is this classification used in some way to decide whether or not an elliptic curve can be used in cryptography? If not is there an other classification which responds to my question? If yes, what does t...
Can j-invariants be used to decide which elliptic curves a suited for cryptography?
Imagine if Alice encrypts message to Bob (using public key $P_{bob}$) and then Bob encrypts the same message to Carol (using $P_{carol}$). Is there a way for Bob to prove that: 1. $P_{carol}$ was indeed used 2. Message is still the same that Alice passed to Bob. *Note1: Both ciphertexts and public keys are vis...
AES algorithm is using GF(2^8) Galois Field, what if we use GF(2^16) in place of GF(2^8) whether this will improve the algo or not ?
AES algorithm is using $GF(2^8)$ Galois Field. What if we use $GF(2^{16})$ in place of $GF(2^8)$? Will this improve the algorithm or not?
I'm designing an open ioT protocol to be used on ioT boards based on Texas Instruments RF-based MCUs. These MCUs have an AES module to easily encrypt and decrypt AES content, so that's why I choose a symmetric key algorithm rather than a public key one (also, RSA would need licensing). So, obviously, there are some pro...
The j-invariants classify the elliptic curves up to isomorphisms (if we suppose to work in the algebraic closure). Is this classification used in some way to decide whether or not an elliptic curve can be used in cryptography? - If j-invariants *cannot* be used for classification, is there an other classification w...
The result would not be *AES*, but *Rijndael*. The Rijndael originally was proposed with 1 block size (128 bits) and 5 key sizes (from 128 to 256 is jumps of 32 bits). In the standardization to become AES, only 3 were selected (jumps of 64 bits). What makes block size to be 128? Each of the internal operations does ...
The result would not be *AES*, but <s>*Rijndael*</s> *a generalization of Rijndael*. The Rijndael originally was proposed with 1 block size (128 bits) and 5 key sizes (from 128 to 256 is jumps of 32 bits). In the standardization to become AES, only 3 were selected (jumps of 64 bits). What makes block size to be 128...
What is the 'identity function' in AES?
Using a format preserving encryption scheme that uses AES internally as its block cipher, for a plaintext that I encrypt I want to use that input plaintext as the key. However using AES-128, my keysize is required to be 128 bit. But i cannot guarantee my plaintext to be exactly this length - they are words or num...
Currently, a single GPU cluster can break almost 1000 billions ($10^{10}$) passwords/hashes per seconds, imagine what a state attacker or hackers team can do with hardware ASICs, supercomputers or botnets networks. Basically, **a password of 16-17 characters ($2^{80}$ entropy) can be broken within hours** or days with ...
For the LFSR mod 2, determine the degree of m and maximum sequence length >s_(i+3)≡ s_i+s_(i-2)+s_(i-4) mod 2 determine the degree of m and the maximum sequence length. I can get the degree of m easily by taking 2^(m -1), but I am confused about getting the degree of m. I don't even know what this is referring ...
> For the LFSR mod 2, determine the degree of m and maximum sequence length > s_(i+3)≡ s_i+s_(i-2)+s_(i-4) mod 2 > determine the degree of m and the maximum sequence length. I can get the degree of $m$ easily by taking $2^{(m -1)}$, but I am confused about getting the degree of $m$. I don't even know what...
Using a format preserving encryption scheme that uses AES internally as its block cipher, for a plaintext that I encrypt I want to use that input plaintext as the key. However using AES-128, my keysize is required to be 128 bit. But i cannot guarantee my plaintext to be exactly this length - they are words or num...
I need an additively homomorphic encryption scheme that satisfies: $D(\sqrt{E(m)}) \approx \sqrt{m}$. It seems that the lifted ElGamal satisfies this, but it is hard to do decryption if the message space is large. Is there any other scheme that satisfies this?
Is there an additively homomorphic encryption scheme that supports calculating a square root on the ciphertext?
I was recently asked whether a certain library supports the ECDSAwithNone Signature algorithm. Clearly this would mean ECDSA with the identity function as the hash function. I know this is a really bad idea. And I also know that there's a trivial attack if two messages have the same prefix as the "hash" gets truncated ...
How bad is it to use the identity function as hash for ECDSA?
I need an additively homomorphic encryption scheme that satisfies: $D(\sqrt{E(m)}) \approx m/2$. It seems that the lifted ElGamal satisfies this, but it is hard to do decryption if the message space is large. Is there any other scheme that satisfies this?
Is there an additively homomorphic encryption scheme that supports calculating a square root on the ciphertext, and get a half of the plaintext?
Using a format preserving encryption scheme that uses AES internally as its block cipher, for a plaintext that I encrypt I want to use that input plaintext as the key. However using AES-128, my keysize is required to be 128 bit. But i cannot guarantee my plaintext to be exactly this length - they are words or num...
I am working on a document to explain Bitcoin to students. But I am having a hard time translating the principle described in §2 of [the Bitcoin whitepaper][3] in layman's terms. There is [a great question][1] ([with a great answer][2]) which helps to understand hashing in cryptography better. I am looking for a sim...
Simple digital signature example that one could compute without a computer?
I am working on a document to explain Bitcoin to students. But I am having a hard time translating the principle described in §2 of [the Bitcoin whitepaper][3] in layman's terms. There is [a great question][1] ([with a great answer][2]) which helps to understand hashing in cryptography better. I am looking for a sim...
When using input plaintext as a key for an FPE - What algorithm to use to transform the plaintext to a key of the desired keysize?
Algorithm to transform plaintext to a key of desired keysize, when using input plaintext as key for FPE?
Using a format preserving encryption scheme that uses AES internally as its block cipher, for a plaintext that I encrypt I want to use that input plaintext as the key. However using AES-128, my keysize is required to be 128 bit. But i cannot guarantee my plaintext to be exactly this length - they are words or num...
Modern x86 CPUs support the `PCLMULQDQ` instruction, which does an XOR-multiply of two 64-bit numbers instead of an add-multiply (i.e. typical arithmetic multiplication). This makes XOR-multiplication for $GF(2^{128})$ significantly faster. However, it's only one half of multiplication in $GF(2^{128})$: after the X...
If alice sends messages to bob. And, mallory is able to capture cipher and figure out the effect of sending that cipher to bob. Probably, bob could be a algorithmic stock trading machine and alice could be sending a message to bob to stop trading. (bob takes commands from alice) Mallory could send the captured cipher...
Let’s assume Bob is some algorithmic stock trading machine. Bob takes commands from Alice, who sends messages to Bob. For example: Alice could be sending a message to Bob to stop trading. But if Mallory is able to capture cipher and figure out the effect of sending that cipher to Bob, Mallory could send the capture...
> How do cryptographic systems handle such situations? … What actually is done in real life? In real life, cryptography handles situations like the one you describe by using “authentication”. Authentication links an action, a message or a situation to an identity. In the example you describe, this will practically b...
> How do cryptographic systems handle such situations? … What actually is done in real life? In real life, cryptography handles situations like the one you describe by using “authentication”. Authentication links an action, a message or a situation to an identity. In the example you describe, this will practically b...
XTS-AES uses two keys $(k_1, k_2)$, which are obtained from a concatenated key $k$. Does this key $k$ remain same for the whole disk or changes per sector?
does encrypting a double-length 3DES application key (that has an odd parity) under a double-length 3DES zone master key(also with an odd parity) affect the parity of the application key?
Are there any good symmetric-ish cyphers that involve three or more steps with independent key material for each step? Formally, there should be a function $K(s)$ that returns a tuple $(k_1,..,k_n)$ and a function $P(k,d)$ such that if $d_i = P(k_i,d_{i-1})$ then $d_n=d_0$ but there are no known relationships betwee...
My problem is: I have a enigma message and I know what is the original message ( a repetition of the same letter). Is it possible obtain the enigma key? I only know what kind of Enigma machine is it, but I need to guess the config. parameters. Thanks.
*Definitions:* **M** - original message, **Me** - encrypted message **M**, **S** - watermark message, **Ms** - message **M** with steganography watermark **S**, **e** - encryption private key, **d** - decryption key (it is private too), **s** - key for signing message with watermark, **ds** - de...
Does encrypting a double-length 3DES application key (that has an odd parity) under a double-length 3DES zone master key (also with an odd parity) affect the parity of the application key?
I have an Enigma message and I know what the original message is (a repetition of the same letter). Is it possible obtain the enigma key? I only know what kind of Enigma machine is it, but I need to guess the config. parameters.
I need an additively homomorphic encryption scheme that satisfies: $D(\sqrt{E(m)}) \approx \sqrt{m}$. It seems that the lifted ElGamal satisfies this, but it is hard to do decryption if the message space is large. Is there any other scheme that satisfies this?
Is there an additively homomorphic encryption scheme that supports calculating a square root on the ciphertext?
Problem: I'm thinking about a lightweight solution to provide source authentication (only one source) to multiple receivers (multicast message). Context: Taking the problem to ground, we can think of use cases like firmware update (one to many), or a command to turn on several lights 'on' (that command can be sen...
"Is this true?" No, Cuckoo Cycle is not broken. Did you bother reading the paper? Or the easy introduction in the blog post "Beyond the Hashcash Proof-of-Work (there’s more to mining than hashing)" at http://cryptorials.io/beyond-hashcash-proof-work-theres-mining-hashing/ The original proposal (from Jan 2014...
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...
"Is this true?" No, my Cuckoo Cycle Proof of Work scheme is not broken. Did you bother reading the paper? Or the easy introduction in the blog post "Beyond the Hashcash Proof-of-Work (there’s more to mining than hashing)" at http://cryptorials.io/beyond-hashcash-proof-work-theres-mining-hashing/ The origin...
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...
"Is this true?" No, my Cuckoo Cycle Proof of Work scheme is not broken. Did you bother reading the paper? Or the easy introduction in the blog post "Beyond the Hashcash Proof-of-Work (there’s more to mining than hashing)" at http://cryptorials.io/beyond-hashcash-proof-work-theres-mining-hashing/ The origin...
"Is it true that memory-hardness is enough to ensure that ASICs won't have much of an advantage over general-purpose CPUs? What prevents an attacker from building a custom ASIC and buying off-the-shelf DRAM chips, and building systems that pair each ASIC with a DRAM chip?" You might find (partial) answers in the dis...
"Is it true that memory-hardness is enough to ensure that ASICs won't have much of an advantage over general-purpose CPUs? What prevents an attacker from building a custom ASIC and buying off-the-shelf DRAM chips, and building systems that pair each ASIC with a DRAM chip?" You might find (partial) answers in the dis...
*PREMISE: This question is purely theoretical because usually an attacker will not know private exponent **d** and can't compare it with obtained MSB bytes.* Suppose an RSA 1024 bit signature. An attacker through a key exposure obtain the half most significant bytes of the private exponent **d**. Can the attac...
Problem: I'm thinking about a lightweight solution to provide source authentication (only one source) to multiple receivers (multicast message). Context: Taking the problem to ground, we can think of use cases like firmware update (one to many), or a command to turn on several lights 'on' (that command can be sen...
> Is it true that memory-hardness is enough to ensure that ASICs won't have much of an advantage over general-purpose CPUs? What prevents an attacker from building a custom ASIC and buying off-the-shelf DRAM chips, and building systems that pair each ASIC with a DRAM chip? You might find (partial) answers in the dis...
> Is it true that memory-hardness is enough to ensure that ASICs won't have much of an advantage over general-purpose CPUs? What prevents an attacker from building a custom ASIC and buying off-the-shelf DRAM chips, and building systems that pair each ASIC with a DRAM chip? You might find (partial) answers in the dis...
> Is it true that memory-hardness is enough to ensure that ASICs won't have much of an advantage over general-purpose CPUs? What prevents an attacker from building a custom ASIC and buying off-the-shelf DRAM chips, and building systems that pair each ASIC with a DRAM chip? You might find (partial) answers in the dis...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known (read: published) “memory-hard PoW” solutions could be rendere...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known (read: published) “memory-hard PoW” solutions could be rendere...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known (read: published) “memory-hard PoW” solutions could be rend...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known (read: published) “memory-hard PoW” solutions could be rend...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known (read: published) “memory-hard PoW” solutions could be rend...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known (read: published) “memory-hard PoW” solutions could be rend...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known (read: published) “memory-hard PoW” solutions could be rend...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically, the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known and/or published “memory-hard PoW” solutions could be rend...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically, the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known and/or published “memory-hard PoW” solutions could be rend...
> Memory-hard proof-of-work: are they ASIC-resistant? Theoretically, the answer is a clear “no”. Given enough resources (read: invested time and money) and the appropriate knowledge (ASICs don’t grow on trees, they have to be designed) all currently known and/or published “memory-hard PoW” solutions could be rend...
Using a format preserving encryption scheme that uses AES internally as its block cipher, for a plaintext that I encrypt I want to use that input plaintext as the key. However using AES-128, my keysize is required to be 128 bit. But i cannot guarantee my plaintext to be exactly this length - they are words or num...
> What prevents an attacker from building a custom ASIC and buying off-the-shelf DRAM chips, and building systems that pair each ASIC with a DRAM chip? DRAM memory is already pretty optimized for random memory accesses per second per dollar. Since a memory bound PoW spends more time waiting for memory than doing c...
How is it insecure for Alice to encrypt a message with a One Time Pad to Bob and then Bob using the decrypted message from Alice as the next One Time Pad? For example Alice sends Bob a message "Hello World" with the Key of "Orange Fish" which they both shared earlier. Vvlyu Atzdk(Hello World). Then Bob uses "Hello W...
One Time Pads and reuse of the decrypted message?
How is it insecure when Alice encrypts a message with a One-Time-Pad to Bob, and Bob then uses the decrypted message from Alice as the next One-Time-Pad? For example: Alice sends Bob a message `Hello World` with the Key of `Orange Fish` which they both shared earlier. `Vvlyu Atzdk` (`Hello World`). Then Bob uses `He...
How is it insecure when Alice encrypts a message with a One-Time-Pad to Bob, and Bob then uses the decrypted message from Alice as the next One-Time-Pad? For example: Alice sends Bob a message `Hello World` with the Key of `Orange Fish` which they both shared earlier. `Vvlyu Atzdk` (`Hello World`). Then Bob uses `He...
Due to growing concerns over the threat of quantum computing to asymmetric cryptography (RSA, ECC, etc), a number of "quantum resistant" replacements have been proposed ([SPHINCS](http://sphincs.cr.yp.to/sphincs-20150202.pdf), [McBits](http://binary.cr.yp.to/mcbits-20130616.pdf), and many more). How are these cryptosy...