instruction stringlengths 15 30k |
|---|
Suppose in a future version of x509 PKI, it is possible to limit the quantity of certificates being used, what would that look like?
Here is a concept that won't work in the real world, but illustrates what I'm trying to do:
1. The child CA sends a list of primes to the parent CA (the prime is the public key of a... |
I have a bit problem with padding. Everything goes fine when I encrypt the text BUT when I decrypt I see some extra characters. Sometime's one character sometimes more and I dont know how to remove them.
But one question I am really upset with is that why does padding show in my decrypted text BUT now others?
Her... |
Please let me know
how much a normal (home pc) cpu time is required to generate a prime number of size 100 bit, 200 bit and 1024 bit using given random bits of respective sizes?
Please note that the prime number computed should be immediate next to the given random number. (e.g. given random number is 15 the com... |
how much a normal (home pc) cpu time is required to generate a prime number of size 100 bit, 200 bit and 1024 bit? |
Please let me know
how much a normal (home pc) cpu time is required to generate a prime number of size 100 bit, 200 bit , 512 bit and 1024 bit using given random bits of respective sizes?
Please note that the prime number computed should be immediate next to the given random number. (e.g. given random number is ... |
how much a normal (home pc) cpu time is required to generate a prime number of size 100 bit, 200 bit, 512 bit and 1024 bit? |
How much CPU time is required on a typical home computer to generate a prime number of size 100 bit, 200 bit , 512 bit and 1024 bit using given random bits of the respective sizes?
Please note that the prime number computed should be immediately next to the given random number, e.g. if the random number is 15, the c... |
How much (home PC) CPU time is required to generate a prime number of a given size? |
I am studying for network security exam. And in the slide about Key Management, under a heading Key Verification I see this:
**Key Verification**
- Almost all cryptographic algorithms have some weak keys that should
not be used.
- With the help of key verification procedures, these keys can be
regenera... |
I'm trying to implement a short scale electronic voting application in a domain comprised of no more than 100 clients. System administrator is able to create new election instances and each client is able to cast his vote once for each election.
I do believe that a PKI (e.g. OpenSSL) is necessary here in order to is... |
In our current system we use an encryption solution based on RSA with OAEP padding. Key size is optional but default 2048. What is the general strength of RSA with OAEP? Are there know attacks that can break it, their complexity? Are people using it and relying on it as secure enough?
Thanks |
I want to know if there is an easy way to do this:
- create a complete HTML page
- cryptography the text content (image is not important)
- ask user some password
- if the password is correct it will decode it and show the content.
All this in user-side, not server-side. Because this I will use javascript... |
Is there a client-side program to cryptography a HTML page and decode if correct password is writen? |
I am currently implementing Salsa20 from the specification as an exercise in learning and self-flagellation.
I have Sections 1-7 passing the test examples provided. I am now stuck on [Section 8, The Salsa20 hash function][1] (Page 6):
![The Salsa20 hash function][2]
1) What is confusing is the **doubleround$^1... |
How to implement the Salsa20 hash function? |
I am currently implementing Salsa20 from the specification as an exercise in learning and self-flagellation.
I have Sections 1-7 passing the test examples provided. I am now stuck on [Section 8, The Salsa20 hash function][1] (Page 6):
![The Salsa20 hash function][2]
1) What is confusing is the **doubleround$^1... |
I have an architecture where:
- a user can have multiple devices (phones)
- the server needs to broadcast the payload to all devices through the same channel
(basically, all devices listen and receive the same payload)
Now, I need encryption for messages from server to devices.
- the first phone will have t... |
I would like to create random Galois fields over $G(2^8)$ with operators $(\otimes, \oplus)$ where $\oplus$ is the standard XOR and $\otimes$ is a randomly defined multiplicative operator. I have an algorithm in mind, but I suspect that it will not generate all possible fields. I know that all such fields are isomorphi... |
I am currently going through a course in cryptography.
In this, i stumbled upon Pseudorandom functions. I got little idea on Pseudorandom generator which maps an input string (key) into an extended string.
However, i do not understand the pseodo concept in case of function.
Referring, the book *Introduction to mod... |
I am currently going through a course in cryptography.
In this, I stumbled upon Pseudorandom Functions. I got a little idea of Pseudorandom Generators which map an input string (key) to an extended string.
However, I do not understand the pseudorandomness concept in case of a function.
In the book *Introduction to... |
If an Initialization Vector (IV) is reused (under the same encryption key ) in Cipher Feedback Mode (CFB), what is the effect upon security?
I know there is some negative effect upon security, but I can't figure out if it leaks information about just the blocks with the same IV, or if it destroys security for all ... |
If an Initialization Vector (IV) is reused (under the same encryption key) in Cipher Feedback Mode (CFB), what is the effect upon security?
I know there is some negative effect upon security, but I can't figure out if it leaks information about just the blocks with the same IV, or if it destroys security for all the... |
EdDSA calculates S=(r+H(R|A|M)∗a) mod l and r=B*H(h|M)
H being the hash function (sha2/512) B being the generator, A being the public key, a being the secret key, r being the per signature random, h being the secret seed (h[b..2b-1] in the paper).
What is the effect on the security of the signature if M is replac... |
Is changing H(R|A|M) to H(R|A|H(M)) in EdDSA secure? |
EdDSA calculates s=(r+H(R|A|M)∗a) mod l and r=H(h|M)
H being the hash function (sha2/512) B being the generator, A being the public key, a being the secret exponent, r being the per signature random, h being the secret seed (h[b..2b-1] in the paper).
What is the effect on the security of the signature if M is rep... |
EdDSA calculates $s=(r+H(R\mathbin{\Vert}A\mathbin{\Vert}M)\cdot a)\bmod\ell$ and $r=H(h\mathbin{\Vert}M)$, with
- $H$ being the hash function (SHA2/512);
- $B$ being the generator;
- $A$ being the public key;
- $a$ being the secret exponent;
- $r$ being the per-signature random;
- $h$ being the secret seed ($h... |
Is changing $H(R\mathbin{\Vert}A\mathbin{\Vert}M)$ to $H(R\mathbin{\Vert}A\mathbin{\Vert}H(M))$ in EdDSA secure? |
The security of the EC25519 is given as 128 bits, but since the order of the group is 252 bits shouldn't the security be 126 bits? Given as half the magnitude of the underlying field, since DLP algorithms such as Baby-Step-Giant-Step and Pollard-Rho generally have a complexity of O(sqrt(n)), n being the order of group.... |
Isn't the security of EC curve 25519 126 bits? |
Given a finite field GF(P^Q), having a subgroup with a prime order of L (P,Q,L are all primes), how difficult is it to find the discrete log, is it related to P and Q or is it related to L, or to both. What is the time required? O(sqrt(L)) ?
Does index calculus apply to Galois fields? |
In the [Bernstein _et al._ paper about EdDSA](http://ed25519.cr.yp.to/ed25519-20110926.pdf), the authors claim EdDSA is resilient against collisions (i.e. it can still be secure even if the hash function used isn't collision-resistant), drawing on a [result](http://www.neven.org/papers/schnorr.pdf) from Neven _et al._ ... |
Why is EdDSA collision-resilient with SHA-512? |
I see in the [Salsa20 specification][1] there are test examples throughout the document to help an implementer make sure every function works as designed. Consequently the whole algorithm would work perfectly if all the tests pass. Without these test vectors it would be very difficult to know whether the code was worki... |
Where are the ChaCha20 test vectors/examples? |
I have a base64 'cipher' text, I know that in clear text is a hidden xml document (I do not know nothing about its structure), but the base64 aplhabet was somehow shuffled. Is there any smart way, how to detect the modified alphabet better than checking all 64! permutations? I can reduce slightly the number of permutat... |
I would like to create random Galois fields over $G(2^8)$ with operators $(\otimes, \oplus)$ where $\oplus$ is the standard XOR and $\otimes$ is a randomly defined multiplicative operator. I have an algorithm in mind, but I suspect that it will not generate all possible fields. I know that all such fields are isomorphi... |
I need a nonce to encrypt my stuff using NaCl secretbox. I will be transmitting the nonce along with the ciphertext, which I have been told is OK to do. It occurs to me that one could simply use the hash of the plaintext as the nonce instead, since it will not collide and is easily accessible (I need to generate it any... |
Using hash of plaintext as nonce in NaCl secretbox- bad idea? |
In the traditional sense, a nonce is a number that is only used once (with the same key). Though occasionally there are other requirements. For example, we may require that the nonce be unpredictable. For more on this I recommend you read [this answer](http://crypto.stackexchange.com/a/8497/706) and [this answer](http:... |
The password `P` in the Microsoft implementation is first encoded using UTF-8. The iteration count `c` defaults to the value 100, and the hash algorithm `Hash` to SHA-1.
The output is identical to PBKDF1 up to the maximum output size of PBKDF1, which is the output size of the hash. After that the first-to-last hash ... |
I want to know if there is an easy way to do this:
- create a complete HTML page
- cryptography the text content (image is not important)
- ask user some password
- check the password with a cryptographed password `if(hash(userPassword)==hasedPassword)) return true; `
- if the password is correct it will d... |
How much CPU time is required on a typical home computer to generate a prime number of size 100 bit, 200 bit , 512 bit and 1024 bit using given random bits of the respective sizes?
Please note that the prime number computed should be immediately next to the given random number, e.g. if the random number is 15, the c... |
I am currently going through a course in cryptography.
In this, I stumbled upon Pseudorandom Functions. I got a little idea of Pseudorandom Generators which map an input string (key) to an extended string.
However, I do not understand the pseudorandomness in case of a function.
In the book *Introduction to modern ... |
I have done a lab about wireless sensor nodes and got in touch with encryption for the very first time. There are some questions on my sheet, especially on integrity protection (the attacker wants to tamper our data) which I wanted to ask about. I read some stuff but I don't feel so comfortable:
1) Why is a simple che... |
That scheme is effectively the same as having the parent CA counter-sign all issued certificates, since the parent will have to make a new signature (on a new accumulator) for each newly issued certificate.
What are the features you want from such a scheme?
To frame the question, here's a trivial scheme: client s... |
Assume an attacker captures a piece of ciphertext encrypted with a symmetric key.
He knows all the details of the algorithm used to encrypt except for the size of the key used in this case.
Can he deduce the size of the key used to encrypt that particular piece of ciphertext?
My research:
According to this ... |
Can one deduce the symmetric key size used to encrypt a given a piece of ciphertext? |
Do systems exist for automatically testing ciphers for security? The application in mind would be for checking for compliance with export regulations.
Are such systems available as open-source for research? Does anyone have any information about companies using such systems? |
I am currently going through a course in cryptography.
In this, I stumbled upon Pseudorandom Functions. I got a little idea of Pseudorandom Generators which map an input string (key) to an extended string.
However, I do not understand the pseudorandomness in case of a function.
In the book *Introduction to modern ... |
Going through the [blog post][1], I was under the impression that any cryptographic scheme which makes use of hash function is said to be using random oracle. But, I have come across one construction of ring signature scheme which uses hash function, yet the paper is titled as [Sub-linear Blind Ring Signatures Without ... |
I would like to create random Galois fields over $G(2^8)$ with operators $(\otimes, \oplus)$ where $\oplus$ is the standard XOR and $\otimes$ is a randomly defined multiplicative operator. I have an algorithm in mind, but I suspect that it will not generate all possible fields. I know that all such fields are isomorphi... |
Some months ago I found in some paper that we cannot compare symmetric algorithm with asymmetric algorithm based on the key length and more important we cannot compare asymmetric algorithm using only the key length, while a comparison of only symmetric algorithm in this term is reasonable... I explained it basing on th... |
I know this may not be the place to ask this but I have found it difficult to find an answer to this question. I know the steps of the AES encryption algorithm but I am finding it difficult to understand the concept stage by stage.
How would by not adding the round key at each stage increase the vulnerability in AES... |
Usually we only consider those keys, we can actually use. There is no restriction about the bits in a symmetric key, you can use all of them. For asymmetric encryption schemes, both keys need to fulfill some constraints to actually work. For example:
In RSA, $e$ has to be chosen coprime to $\phi(n)$, and you need $e... |
If the number of phones will not be "large," the answer is simple: encrypt each message with a session key, then encrypt the session key to each phone's public key and stick the list of wrapped keys on the front of the message. Each phone finds its own wrapped key, unwraps it, and decrypts the message.
If you're looki... |
I understand that it is necessary to use the same IV for both encryption and decryption in the `CTR mode`. I'm thinking about the case when I **concatenate** the secret key along with the IV after generation, and the resulting is sent to the receiver side in secure manner. Thus, is it practical to create 32 byte array ... |
I understand that:
* A stream cipher's security is diluted if the same key is used more than once. This is fixed by using an additional initialization vector in the keystream's computation.
* A block cipher run in the most simple way, electronic codebook mode, has negligible security due to pattern preservation. Th... |
In the article "A Method for Obtaining Digital Signatures and Public-Key Cryptosystems", the original RSA article, it is mentioned that Miller has shown that n (the modulus) can be factored using any multiple of φ(n).
Imagine I know the public and the private key. But what I really want is the factors of n, the p an... |
I understand that it is necessary to use the same IV for both encryption and decryption in the `CTR mode`. I'm thinking about the case when I *concatenate* the secret key along with the IV after generation, and the resulting byte array is sent to the receiver side in secure manner.
Is it practical to create a 32 byt... |
Do systems exist for automatically testing ciphers for security? The application in mind would be for checking for compliance with export regulations.
I imagine a system that automatically tests for known plaintext, chosen plaintext and the like, presumably by some kind of cryptanalysis operating on the cipher as a ... |
In the article "A Method for Obtaining Digital Signatures and Public-Key Cryptosystems", the original RSA article, it is mentioned that Miller has shown that n (the modulus) can be factored using any multiple of φ(n).
Imagine I know the public and the private key. But what I really want is the factors of n, the p a... |
How to find the factors of the modulus? |
In the article [A Method for Obtaining Digital Signatures and Public-Key Cryptosystems](http://people.csail.mit.edu/rivest/Rsapaper.pdf), the original RSA article, it is mentioned that Miller has shown that n (the modulus) can be factored using any multiple of φ(n).
Imagine I know the public and the private key. But... |
If a wise person was unsure about which commercial cryptography standards are [truly secure][1] from [the fascist powers that be][2], it would seem the obvious option for companies and individuals is to now use two independent algorithms to encrypt. To be clear I am not talking about a cascade cipher e.g. $Encryption_2... |
What cryptanalysis is possible against two independent keystreams XORed against plaintext? |
Yes, your analysis is right. Don't know why Maarten Bodewes - owlstead says something else. This doesn't mean that your scheme is secure or the best idea.
Every plaintext block will be encrypted with a new, pseudo random key. If the bit generation of the stream cipher is secure then there's no known way to get the o... |
I assume you're already familiar with pseudorandom generators. A PRG takes a short random seed and generates a long pseudorandom string. You can extend a PRG using a simple output-feedback construction, to achieve a PRG with any *polynomial* output length.
But can you ask for even more? Can you take a short random s... |
I'am trying to implement algorithms on integer factorization.This involves dealing with integers of 200-500 digits and doing modular arithmetic over them.Which programming language has inbuilt support for large numbers?Does C++ support large number arithmetic? |
If a wise person was unsure about which commercial cryptography standards are [truly secure][1] from [the fascist powers that be][2], it would seem the obvious option for companies and individuals is to now use two independent algorithms to encrypt. To be clear I am not talking about a cascade cipher e.g. $Encryption_2... |
In the article (https://eprint.iacr.org/2009/571.pdf, pag 8) of Smart and Vercauteren, it is mentioned that the recovery of the private key is an instance of the small principal ideal problem. But I dont see how this is possible, since this implies that we know the ring in which we work, i.e. we know the polynomial $F$... |
A secure and somewhat fast way to "re-encrypt" (refresh? anonymise?) a Paillier ciphertext, $c$, is to multiply it by an exponentiated random value:
$c \gets c \cdot r^n \mod n^2$ (with $r \in \mathbb{Z}_n$ random)
However, that mod exponentiation of a large $r$ is quite costly (many orders more than the other op... |
How bad would it be to reuse the random blinding factor in a scheme like Paillier? |
I am designing a distributed system, composed by a set of physically distributed embedded devices (8 bit cores with less than 1 KB of RAM). The devices need to be able to authenticate the originator of the commands they receive, and for that purpose I choosed HMAC.
Each device has a secret key, and a central server ... |
The first obvious objection is that it would do a lousy job of blinding values; if you reuse the blinding factor, then it would be practical to correlate the blinded values with their original ones (and the entire point of blinding values is to prevent anyone from doing so).
Suppose we had two original encrypted val... |
This question is a follow-up/variant on a previous [question](http://crypto.stackexchange.com/questions/22404/how-bad-would-it-be-to-reuse-the-random-blinding-factor-in-a-scheme-like-paillie).
Supposing that we are trying to generate a *large* number of (indistinguishable) ciphertexts of a given plaintext and want t... |
Is there a hash function `H1` which, when given inputs `a`, `b`, etc., produces output `Z`, and an `H2` which can verify any one of `a`, `b`, etc. when given `Z` like this:
H1(a, b) => Z
H2(Z, a) => true
H2(Z, b) => true
H2(Z, c) => false
And where Z is (currently thought to be) cryptographical... |
Hash which can be used to verify one of multiple inputs? |
I'm definitely a *non-expert* who's trying to make his way in FE used for access control.
I read a lot of papers such as ["How to Run Turing Machines on Encrypted Data"][1], ["Functional Encryption: New Perspectives and Lower Bounds"][2], or ["Attribute-based encryption for circuits"][3] and I ended up with a feelin... |
What are the current limitations (and capabilities) of Functional Encryption used for access control? |
I am designing a distributed system, composed by a set of physically distributed embedded devices (8 bit cores with less than 1 KB of RAM). The devices need to be able to authenticate the originator of the commands they receive, and for that purpose I chose HMAC.
Each device has a secret key, and a central server kn... |
I have recently read about AES cache timing attacks. More specifically, I read Daniel Bernstein paper [Cache-timing attacks on AES][1]. I have a question about the code in Appendix A:
unsigned int timestamp(void)
{
unsigned int bottom;
unsigned int top;
asm volatile(".byte15;.byte 49" : "=a"(bottom),"=d"(top));
... |
What kind of attack does the current brokenness of SHA-1 allow? |
1. ## *“Does anyone know what the Megamos algorithm is?”*
Yes. According to [http://www.bicotech.com/doc/megamos_cr.pdf (PDF)](http://www.bicotech.com/doc/megamos_cr.pdf) — which provides the best description from my point of view — the Megamos crypto is:
> **MEGAMOS CRYPTO**
*Read-Write High Security Device ... |
I have recently read about AES cache timing attacks. More specifically, I read Daniel Bernstein paper [Cache-timing attacks on AES][1]. I have a question about the code in Appendix A:
unsigned int timestamp(void)
{
unsigned int bottom;
unsigned int top;
asm volatile(".byte15;.byte 49" : "=a"(... |
AES works when each plaintext block is arranged in a 4x4 array of bytes called states. State goes through 10 rounds of encryption consisting of 4 operations: bytesub, shiftrow, mix columns and add round key. I know how it all works but in preparation for my exam I have two questions which I don't understand.
How w... |
This question is a follow-up/variant on a previous [question](http://crypto.stackexchange.com/questions/22404/how-bad-would-it-be-to-reuse-the-random-blinding-factor-in-a-scheme-like-paillie).
Supposing that we are trying to generate a *large* number of (indistinguishable) ciphertexts of a given plaintext and want t... |
I am using [CryptSignMessage][1] to sign a string/file. Is using RSASha1 insecure?
I know Sha1 is broken as a hashing algorithm, but does that also mean that using it for signing with RSA is broken?
[1]: http://msdn.microsoft.com/en-us/library/windows/desktop/aa380281%28v=vs.85%29.aspx |
Is RSA with SHA1 broken? |
To start with, it's certainly not a bad idea to avoid SHA-1 when other algorithms exist, which do not have the SHA-1 weaknesses to anyone's knowledge.
The security of SHA-1 depends on how you're using it. The vulnerability is what's known as a _collision vulnerability_: an attacker has the ability to create two inpu... |
Does your embedded device have access to a random input source and a bidirectional channel?
If not, then there will only ever be as much entropy on the chip as you put on it to begin with, so there's no purpose in updating the key.
If so, then just do an authenticated key exchange and generate a new shared symmet... |
Is an unbreakable code mathematically possible , considering a code with finite number of characters but has infinite combinations , using brute force is it not compulsory that the correct code be found in a finite time ? |
I'm definitely a *non-expert* who's trying to make his way in FE used for access control.
I read a lot of papers such as ["How to Run Turing Machines on Encrypted Data"][1], ["Functional Encryption: New Perspectives and Lower Bounds"][2], or ["Attribute-based encryption for circuits"][3] and I ended up with a feelin... |
Is there a hash function `H1` which, when given inputs `a`, `b`, etc., produces output `Z`, and an `H2` which can verify any one of `a`, `b`, etc. when given `Z` like this:
H1(a, b) => Z
H2(Z, a) => true
H2(Z, b) => true
H2(Z, c) => false
And where Z is (currently thought to be) cryptographical... |
This question is a follow-up/variant on a previous [question](http://crypto.stackexchange.com/questions/22404/how-bad-would-it-be-to-reuse-the-random-blinding-factor-in-a-scheme-like-paillie).
Supposing that we are trying to generate a *large* number of (indistinguishable) ciphertexts of a given plaintext and want t... |
This question is a follow-up/variant on a previous [question](http://crypto.stackexchange.com/questions/22404/how-bad-would-it-be-to-reuse-the-random-blinding-factor-in-a-scheme-like-paillie).
Supposing that we are trying to generate a *large* number of (indistinguishable) ciphertexts of a given plaintext and want t... |
Usually we only consider those keys, we can actually use. There is no restriction about the bits in a symmetric key, you can use all of them. For asymmetric encryption schemes, both keys need to fulfill some constraints to actually work. For example:
In RSA, $e$ has to be chosen coprime to $\phi(n)$, and you need $e... |
I'm a bit confused in the way nonces are used in these processes to prevent replay attacks.
Heres How I think it works during SSL:
Nonces are exchanged during stage one of the handshake protocol. Nonces of the other party will be different so the keys will be different. The random numbers are used to create symmetr... |
I am trying to encrypt big files using NaCL (actually PyNaCL) -
After reading some docs, I came up with this prototype :
- generate a random nonce that will be used for every encryption
- read the file chunk by chunk (size: 4096 bytes)
- for each chunk, update an SHA256 hash **
- encrypt the chunk using c... |
Can AES in Galois/counter mode (GCM) interoperate with AES in "plain" counter mode (CTR)? |
I am exploring the use of Windows CNG to replace some OpenSSL-based code that takes advantage of AES in counter mode. From the outside, everything should look the same after the switch.
This [piece of CNG documentation](http://msdn.microsoft.com/en-us/library/windows/desktop/aa376211%28v=vs.85%29.aspx) gives me the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.