instruction stringlengths 15 30k |
|---|
How do I encrypt a 12 character network adapter mac address so i can get in result with a 20 to 25 cipher text length? |
I would like to access the encrypted data from cloud service provider, as we all know it is pay-as-u-go model, to restrict revoked users csp's will re-encrypt the data and send the new key to valid users alone through their mail.
valid users before using the new key, wants to check for integrity+authenticity? how is... |
how to check the integrity of a msg received through mail ? if both parties use aes instead of rsa? |
First, you should start by guessing which symbols in the ciphertext are actually enciphered, and which are simply written in plain. (Don't worry if you guess wrong, you can always make several guesses.) For a Vigenère cipher, one also needs to guess whether any non-encrypted characters should advance the key position... |
I would like to provide access to encrypted data through a cloud service provider, using a pay-as-you-go model. This means that we will sometimes need to revoke a user's access to the data. To restrict a revoked user's access, the CSP will re-encrypt the data and send the new key to valid users only through their mail.... |
How to check the integrity of a key received through mail using symmetric encryption? |
Based on a quick Google search, I assume you're reading the paper "Modified Koblitz Encoding Method for ECC" by Kodali and Sarma (_Int.J.Rec.Tr.Eng.Tech._, vol. 8, no. 1, Jan 2013).
The fact that the paper doesn't actually cite any source for the encoding scheme, or even cite *anything* by Koblitz, makes me a bit sk... |
> Are the Certificate Signature Algorithm and signature algorithm in the
> negotiated connection cipher suite used for different purposes?
**Yes they are.**<br>
The hash negotiated in the cipher suite is completely irrelevant to the certificate. The verification of the certificate and the signatures in the TLS han... |
The previous answer has the correct formula for estimating the security level of prime field elliptic curves. However, the table seems to just list the closest Koblitz curve sizes used, as Richie Frame points out.
If you computed the actual security strength of the curves in question, you would not end up with exact... |
What is the most secure ECC Curve? |
I'm using this kind of technique instead of padding of cipher buffer (here goes pseudo-code):
struct {
int size; //size of cipher buffer
byte[32] vector; //random IV (block size is 256 bits)
byte[] buffer; //encrypted buffer
}
Cipher data encrypted using block cipher wi... |
Is it safe cipher block sizing instead of padding? |
I'm trying to contrast key rotation requirements for asymmetric and symmetric ciphers.
In the case of symmetric ciphers, we have the results such as the so called "CBC Theorem" (stated on pg. 24 of https://crypto.stanford.edu/~dabo/cs255/lectures/PRP-PRF.pdf)
The CBC Theorem states that for a "q - query" CPA attac... |
I'm currently working on a proposal for some secure complete system and one of the things currently lacking is the database security.<br>
However I don't want to roll my own crypto there and thereby need a secure, somewhat reviewed / standard way to cryptographically secure the databases.
I had a look at CryptDB for ... |
> I have not seen a proof of theorem, but I'm guessing such results arise from basing the security of block cipher modes *purely* on their behavior as pseudo random functions.
Another factor is that block ciphers are *not* pseudorandom functions (PRF), but pseudorandom permutations (PRP). That means that as you get ... |
Consider such authentication protocol:
Alice and Bob share a key.
1. Bob sends alice a nonce.
2. Alice encrypts it with shared key and sends to bob.
Now assume Alice was successfully authenticated.
But there is such attack mentioned
> Trudy can hijack connection **after** authentication, if she can se... |
**TL;DR: The mentioned attack only works against plaintext connections.**
> Alice and Bob share a key.
If this is the case, you shouldn't roll your own protocol. Just rely on the power of [TLS][1] and its [PSK][2] ciphersuites - preferably the ones which offer forward secrecy by also using an (EC)[DHE exchange][3... |
**TL;DR: The mentioned attack only works against plaintext connections.**
> Alice and Bob share a key.
If this is the case, you shouldn't roll your own protocol. Just rely on the power of [TLS][1] and its [PSK][2] ciphersuites - preferably the ones which offer forward secrecy by also using an (EC)[DHE exchange][3... |
I'm using this kind of technique instead of padding of cipher buffer (here goes pseudo-code):
struct {
int size; //size of cipher buffer
byte[32] vector; //random IV (block size is 256 bits)
byte[] buffer; //encrypted buffer
}
Cipher data encrypted using block cipher wi... |
Is it safe to use cipher block sizing instead of padding? |
Reading your message, we (in ZeroDB) realize that we need to add some things to our documentation.
> Provides authenticity and secrecy (most important)
That one we do have now
> provides integrity over the whole database (no silent dropping of data)
We pretty much have it at the level ZODB we base on has (A... |
The first remark is that the cryptosystems are used with independent keys. This is important, otherwise it is usually very hard to prove anything.
### The simple solution ###
Now, the simple solution is, as is mentioned in the comment and the linked question, is to *secret-share* your message into two shares and en... |
I'm using openssl with aes-256-cbc encryption to encrypt a file. The password is on the first line of the file and the encryption script automatically reads the first line of the file for encryption. Is this procedure secure? Openssl stores the salt at the first 8 bytes of the file. |
Curves secp256r1 and secp256k1 are both examples of two [elliptic curves](http://en.wikipedia.org/wiki/Elliptic_curve) used in various asymmetric cryptography.
Googling for these shows most of the top results are Bitcoin related. I've heard the claim that…
> Satoshi picked non-standard crypto which conventional ... |
Besides the security benefits of encrypt-then-MAC that many other answers have mentioned, there's a performance benefit. Checking the MAC first on the receiving end allows you to reject forged messages without doing the work to decrypt them. Bernstein mentions this in http://cr.yp.to/snuffle/design.pdf (in the section ... |
What is the best practice to accomplish this? For example, let's have an initial value `abc123456` and a seed `secret_hash`. I want to change the initial value once about every hour to a new value and be able to decrypt any future value back to the original one.
Should I use an external known value, for instance tim... |
What algorithm to use to rotate values in a predefined manner and be able to decrypt them back to the original? |
I have a 256-bit seed; call it P. From P, I need to derive 2<sup>19</sup> 256-bit numbers deterministically.
There's a catch, however: I want to derive them in any order. For example, I might need the 7878th number, followed by the 51st number. For that reason, deriving them with a stream cipher is inappropriate fo... |
How should I generate secure random numbers deterministically? |
RSA is not designed to be used on long blocks of plaintext like a block cipher, but I need to use it to send a large (encrypted) message.
How can I do this? |
The curves secp256r1 and secp256k1 have comparable security.
If we consider only the best known attacks today, they have very close security.
Both curves are defined over prime fields and have no known weakness, therefore the best attack that applies is [Pollard's Rho][1]. Its complexity is: $\sqrt{\frac{{\pi}n}{2m... |
Here's the Wiener's attack as I understand it.
Suppose $n=pq$ with $p < q < 2q$, and $d < n^{1/4}/3$ where $ed=k\phi(n)+1$ and $e < \phi(n)$.
$$\begin{align*}
n-\phi(n) &=n-(p-1)(q-1)\\
&= n-(n-p-q-1) \\
&= p+q-1 \\
&< 2q+q-1\\
&=3q-1 \\
&< 3\sqrt{n}
\end{align*}$$
and $e<\phi(n)\implies ke < k\phi(n) =... |
Here's the Wiener's attack as I understand it.
Suppose $n=pq$ with $q < p < 2q$, and $d < n^{1/4}/3$ where $ed=k\phi(n)+1$ and $e < \phi(n)$.
$$\begin{align*}
n-\phi(n) &=n-(p-1)(q-1)\\
&= n-(n-p-q+1) \\
&= p+q-1 \\
&< 2q+q-1\\
&=3q-1 \\
&< 3\sqrt{n}
\end{align*}$$
and $e<\phi(n)\implies ke < k\phi(n) =... |
I'm using openssl with aes-256-cbc encryption to encrypt a file. The password is on the first line of the file and the encryption script automatically reads the first line of the file for encryption. Is this procedure secure? Openssl stores the salt at the first 8 bytes of the file.
Edit:
Sorry if my question is uncl... |
I'm using `openssl` with `aes-256-cbc` encryption to encrypt a file. The password is on the first line of the file and the encryption script automatically reads the first line of the file for encryption. Is this procedure secure? OpenSSL stores the salt at the first 8 bytes of the file.
The file looks like this:
1:... |
The main difference is that secp256k1 is a Koblitz curve, while secp256r1 is not. Koblitz curves are known to be a few bits weaker than other curves, but since we are talking about 256-bit curves, neither is broken in "5-10 years" unless there's a breakthrough.
The other difference is how the parameters have been ch... |
> I have not seen a proof of theorem, but I'm guessing such results arise from basing the security of block cipher modes *purely* on their behavior as pseudo random functions.
Another factor is that block ciphers are *not* pseudorandom functions (PRF), but pseudorandom permutations (PRP). That means that as you get ... |
I have a question for a class of secure communication, but I have no idea about how to proceed in order to answer it. I'll be very grateful to whom replies to me.
Assuming that brute force attack with 80bit keys is infeasible, let's compare the security of the vigenere cipher with the security of the monoalphabetic ... |
I have a question for a class of secure communication, but I have no idea about how to proceed in order to answer it. I'll be very grateful to whom replies to me.
Assuming that brute force attack with 80bit keys is infeasible, let's compare the security of the Vigenere cipher with the security of the monoalphabetic ... |
I have a question for a class of secure communication, but I have no idea about how to proceed in order to answer it. I'll be very grateful to whom replies to me.
Assuming that brute force attack with 80bit keys is infeasible, let's compare the security of the Vigenere cipher with the security of the monoalphabetic ... |
What are the main differences between a nonce, a key and an IV? Without any doubt the key should be kept secret. But what about the nonce and the IV? What's the main difference between them and their purposes? Is it only that, in literature and in practice, an IV is being used as "initiator" of a block cipher encryptio... |
If I create an RSA of 4096 bits, what would be the range of the length in bytes of the public key in DER format?
Also, will the private key always be exactly 4096 bits (512 bytes)? Does the private key length depend on the actual length of the private key, or the length you specified (4096)? |
How long can a RSA public key be? |
I'm designing an API. To avoid abuse, I need to rate limit the requests somehow, but I don't want to do it per user as it's very easy to create new accounts automatically. I think a proof of work algorithm would do this job well, but I thought I would ask an expert, i.e. this community.
These are the properties I wo... |
I know very little about encryption but I was hoping someone could shed light on something I worked out in my head this morning and what this type of cipher text exchange is called:
Bob wants to send Alice a message but doesn't want anyone in the middle to discover what the message is.
We'll call the message p an... |
Why you want to create your own crypto and you don't look the existing one. You are looking for a hybrid encryption scheme in which users with a Diffie Hellman key exchange they agree on a secret symmetric key and then they encrypt their data with a common secret key. What you proposed seems vulnerable to man in the mi... |
I know very little about encryption but I was hoping someone could shed light on something I worked out in my head this morning and what this type of cipher text exchange is called:
Bob wants to send Alice a message but doesn't want anyone in the middle to discover what the message is.
We'll call the message $p$ ... |
I was recently working with some ECC crypto and stumbled across the following phrase [on the SafeCurves page][1]:
> The **rational points** of a complete Edwards curve are the pairs (x,y) of
> elements of F_p satisfying the equation; there is no extra "point at
> infinity".
Normally, if you have a point $G$ on ... |
What happens if you multiply a point with its order on complete Edwards curves? |
Why do you want to create your own crypto instead of looking
at an existing one? You are looking for a hybrid encryption scheme in which users with a Diffie Hellman key exchange. They agree on a secret symmetric key and then they encrypt their data with a common secret key. What you proposed seems vulnerable to man i... |
I am studying the Lamport signature scheme, and I found that in many sources (eg: [Hash-based Digital Signature Schemes](https://www.cdc.informatik.tu-darmstadt.de/~dahmen/papers/hashbasedcrypto.pdf)) the input and output bitstring of the OWF and the message digest have the same size, generally 256.
As the minimal ... |
If I create an RSA of 4096 bits, what would be the range of the length in bytes of the public key in DER format?
Also, will the private key always be exactly 4096 bits (512 bytes)? Does the public key length depend on the actual length of the private key, or the length you specified (4096)? |
Here's the Wiener's attack as I understand it.
Suppose $n=pq$ with $q < p < 2q$, and $d < n^{1/4}/3$ where $ed=k\phi(n)+1$ and $e < \phi(n)$.
$$\begin{align*}
n-\phi(n) &=n-(p-1)(q-1)\\
&= n-(n-p-q+1) \\
&= p+q-1 \\
&< 2q+q-1\\
&=3q-1 \\
&< 3\sqrt{n}
\end{align*}$$
and $e<\phi(n)\implies ke < k\phi(n) =... |
Here's the Wiener's attack as I understand it.
Suppose $n=pq$ with $q < p < 2q$, and $d < n^{1/4}/3$ where $ed=k\phi(n)+1$ and $e < \phi(n)$.
$$\begin{align*}
n-\phi(n) &=n-(p-1)(q-1)\\
&= n-(n-p-q+1) \\
&= p+q-1 \\
&< 2q+q-1\\
&=3q-1 \\
&< 3\sqrt{n}
\end{align*}$$
and $e<\phi(n)\implies ke < k\phi(n) =... |
Here's the Wiener's attack as I understand it.
Suppose $n=pq$ with $q < p < 2q$, and $d < n^{1/4}/3$ where $ed=k\phi(n)+1$ and $e < \phi(n)$.
$$\begin{align*}
n-\phi(n) &=n-(p-1)(q-1)\\
&= n-(n-p-q+1) \\
&= p+q-1 \\
&< 2q+q-1\\
&=3q-1 \\
&< 3\sqrt{n}
\end{align*}$$
and $e<\phi(n)\implies ke < k\phi(n) =... |
If I am decoding a key by applying shares, is it possible to know when the threshold has been reached, and the secret revealed, without having to be told *what* the threshold is ?
Also, is it possible to determine if a share is a "valid" share (ie originally generated by SSS for a given secret)
In case these ques... |
**No, you don't know when the threshold has been reached unless you encode it into your share's format.**
To understand this, I'll quickly revise how SSS works:<br>
The person to share a secret constructs / chooses a random (large) prime and chooses $k$ random numbers ([the coefficients][1]), where $k$ is the thres... |
If I am decoding a key by applying shares, is it possible to know when the threshold has been reached, and the secret revealed, without having to be told *what* the threshold is?
Also, is it possible to determine if a share is a "valid" share (ie originally generated by SSS for a given secret)?
|
As we all know for discussion of Dual_EC_DBRG, the point on an elliptic curve *Q* can be calculated from *P* and some (large) integer *d*
$Q = dP$
And we know that knowing of *Q* and *P* is sufficient to be able to compute *d* efficiently.
## My understanding
I've been hoping to explain why, and I believe t... |
I don't know if I've placed the question right, It is half maths, half programming.
I'm writing Schnorr Ring Signatures on Elliptic Curves in Java and I have a problem. I've found [scheme][1] on integers and translated it to elliptic curves.
In point 3 on page 11
$R_s = g^a \prod_{i \neq s}(y_i^{-H(m, R_i)}) \ m... |
I don't know if I've placed the question right, It is half maths, half programming.
I'm writing Schnorr Ring Signatures on Elliptic Curves in Java and I have a problem. I've found [scheme][1] on integers and translated it to elliptic curves.
In point 3 on page 11
$R_s = g^a \prod_{i \neq s}(y_i^{-H(m, R_i)}) \ m... |
is there some generally available algorithm which will encrypt a short string and generate two unique keys so that any of the two can be used to decrypt the message again? It doesn't has to be "super secure". |
I know very little about encryption, but I was hoping someone could shed light on this cipher text exchange scheme I worked out in my head this morning:
Bob wants to send Alice a message but doesn't want anyone in the middle to discover what the message is.
We'll call the message $p$ and encode it as a number. Th... |
As we all know for discussion of Dual_EC_DBRG, the point on an elliptic curve *Q* can be calculated from *P* and some (large) integer *d*
$Q = dP$
And we know that knowledge of *d* and *P* is sufficient to be able to compute *Q* efficiently, while knowing *P* and *Q* it is _not_ possible to compute _d_ efficientl... |
As we all know for discussion of Dual_EC_DBRG, the point on an elliptic curve *Q* can be calculated from *P* and some (large) integer *d*
$Q = dP$
And we know that knowledge of *Q* and *P* is _not_ sufficient to be able to compute *d* efficiently.
## My understanding
I've been hoping to explain why, and I b... |
Okay so I'm trying to derive a child public key from an EC public key. I've come up with a couple ideas and now I'd like to know which is more secure.
Mp: The master key pair, this includes a private key (denoted Mpri) and an extended public key (denoted Mpub, more on this in a second).
i: Some kind of input fro... |
Would it be better to use HKDF or SCrypt for deriving a child key? |
> And we know that knowing of $Q$ and $P$ is sufficient to be able to compute $d$ efficiently.
I think you meant "knowing $P$ and $d$ we can compute $Q$ efficiently. That's the DLP as stated in your previous answer.
I think it's more intuitive to work in $\mathbb{Z}_p^*$ and in this group you might reframe the DL... |
I have a strong interest in one time pads, and I would suggest that your scheme is a poor substitute for two reasons:-
1. What is the key to decode the message? It would have to be related (however indirectly) to the start position in the pi sequence. For example, you can decode my "Hello Joshua" message by start... |
I've read that RSA is not meant for encrypting large plaintext because:<br>
(Are these also true for other public-key encryptions like ElGamal?)
- It is slow.
- Padding makes the ciphertext blocks much longer.
- No one uses RSA that way; so its security is not scrutinized.
Instead, a *hybrid scheme* is ... |
Let's say I use RSA encryption, it's 2048 bits and I use a simple character padding scheme, every character is turned into a 3 digit number and strung together, then encrypted. Saying that no message will be bellow 40 characters, ending up in a 120 digit number, how insecure is this? |
Let's say I use RSA encryption, it's 2048 bits and I use a simple character padding scheme, every character is turned into a 3 digit number and strung together, then encrypted. Saying that no message will be bellow 40 characters, ending up in a 120 digit number, how insecure is this?
Edit: The public exponent is as... |
Let's say I use RSA encryption, it's 2048 bits and I use a simple character padding scheme, every character is turned into a 3 digit number and strung together, then encrypted. Saying that no message will be below 40 characters, ending up in a 120 digit number, how insecure is this?
Edit: The public exponent is as ... |
I've read that RSA is not meant for encrypting large plaintext because:<br>
(Are these also true for other public-key encryptions like ElGamal?)
- It is slow.
- Padding makes the ciphertext blocks much longer.
- No one uses RSA that way; so its security is not scrutinized.
Instead, a *hybrid scheme* is ... |
How do you encrypt 51 with public key $(n,e) = (23,91)$
I understand that $c = 51^{23} \bmod 91$. How can I calculate the result on a calculator?
|
How do you encrypt $51$ with public key $(n,e) = (91,23)$
I understand that $c = 51^{23} \bmod 91$. How can I calculate the result on a calculator?
|
> And we know that knowing of $Q$ and $P$ is sufficient to be able to compute $d$ efficiently.
I think you meant "knowing $P$ and $d$ we can compute $Q$ efficiently. That's the DLP as stated in your previous answer.
I think it's more intuitive to work in $\mathbb{Z}_p^*$ and in this group you might reframe the DL... |
I've read that RSA is not meant for encrypting large plaintext because:<br>
(Are these also true for other public-key encryptions like ElGamal?)
- It is slow.
- Padding makes the ciphertext blocks much longer.
- No one uses RSA that way; so its security is not scrutinized.
Instead, a *hybrid scheme* is us... |
When/why is RSA (hybrid) encryption used rather than alternatives? |
I've read that RSA is not meant for encrypting large plaintext because:<br>
(Are these also true for other public-key encryptions like ElGamal?)
- It is slow.
- Padding makes the ciphertext blocks much longer.
- No one uses RSA that way; so its security is not scrutinized.
Instead, a *hybrid scheme* is us... |
Exchanging encrypted messages, and decrypting without a public key? |
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 ([Is there a simple hash function that one can compute without a computer?][1]) with [a great answer][2], which ... |
I have some backed up files encrypted with EFS and I lost the EFS certificate thus unable to decrypt the files. I understand that EFS uses the user certificate public key to encrypt the symmetric key (not sure how it's calculated) and then attach it to the file so later using the private key you can decrypt the symmetr... |
Is EFS vulnerable to Chosen plaintext attack? |
From the wikipedia entry on SHA-256 I'm a bit confused about which operations actually go into the algorithm. From the [pseudo code][1] it appears the operations are $\texttt{xor}$, $\texttt{and}$, rotate, shift, and addition. But [further down][2] it says that $\texttt{or}$ also goes into the algorithm. [This][3] desc... |
Which bitwise operations in SHA-256? |
I'm trying to use super encryption with AES in CFB mode with IV and password salting and AES in CTR mode both without padding.I first use AES CFB and the AES CTR .Will it compromise security in any way or is it effiecient compared to using either one of the modes ?? |
Is super encryption always good? |
I'm trying to use super encryption (also known as [“multiple encryption”](https://en.wikipedia.org/wiki/Multiple_encryption)) with AES in CFB mode with IV and password salting and AES in CTR mode both without padding. I first use AES CFB and then AES in CTR mode. Will my approach compromise security in any way, or is i... |
Is super encryption (aka “multiple encryption”) always good? |
I'm trying to use super encryption (also known as [“multiple encryption”](https://en.wikipedia.org/wiki/Multiple_encryption)) with AES in CFB mode with IV and password salting and AES in CTR mode both without padding. I first use AES CFB and then AES in CTR mode. Will my approach compromise security in any way, or is i... |
From the wikipedia entry on SHA-256 I'm a bit confused about which operations actually go into the algorithm. From the [pseudo code][1] it appears the operations are $\texttt{xor}$, $\texttt{and}$, rotate, shift, and addition. But [further down][2] it says that $\texttt{or}$ also goes into the algorithm. [This][3] desc... |
Which bitwise operations are used in SHA-256? |
The `crypto_auth` function produces a 256-bit HMAC, with a 512-bit version also available. But the `crypto_onetimeauth` function (and the Box and SecretBox constructions that use it) only produces a 128-bit authenticator. Is there any particular reason NaCl doesn't include a 128-bit HMAC function? |
Why does NaCl's crypto_auth have twice the security level of crypto_onetimeauth? |
Application uses AES in CBC mode with 128 bit key. In this implementation key is always same and is equal to IV.
Can attacker get the key or decrypt data? if he knows:
1. First and second blocks of plaintexts;
2. All blocks of ciphertexts. |
I am using Android's keystore to generate a key which is protected by fingerprint authentication. This key can be used to encrypt any secrets. In my case, I want to encrypt a user password (which is needed to access the app contents. Usually that's a reasonably strong letter-number-special-characters password.). The en... |
That seems like it would be a useful primitive. Using it in place of a block cipher in the Merkle–Damgård construction would give a variable-length hash, maybe without the [tricky business with related keys](http://crypto.stackexchange.com/a/6476/21442)? Using it to hash a key+nonce+position would give you a stream cip... |
Is there such a thing as a hash function with a fixed size input? |
Application uses AES in CBC mode with 128 bit key. In this implementation key is always same and is equal to IV.
Can attacker get the key or decrypt data? If he knows:
1. First and second blocks of plaintexts;
2. All blocks of ciphertexts. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.