instruction
stringlengths
15
30k
Say you encrypt a message with a key 'k'. o With *symmetric* encryption (ie. symmetric ciphers), 'k' must be secret. The sender and recipient must agree (somehow) on 'k'. No-one else can be allowed to find out 'k'. Anyone else who finds out 'k', can decrypt all the messages encrypted with 'k'. For that reason, sy...
Say you encrypt a message with a key $k$. * With *symmetric* encryption (ie. symmetric ciphers), $k$ must be secret. The sender and recipient must agree (somehow) on $k$. No-one else can be allowed to find out $k$. Anyone else who finds out $k$, can decrypt all the messages encrypted with $k$. For that reason, sy...
Why do we need asymmetric algorithms for key exchange?
Say you encrypt a message with a key $k$. * With *symmetric* encryption (ie. symmetric ciphers), $k$ must be secret. The sender and recipient must agree (somehow) on $k$. No-one else can be allowed to find out $k$. Anyone else who finds out $k$, can decrypt all the messages encrypted with $k$. For that reason, sy...
Say you encrypt a message with a key $k$. * With *symmetric* encryption (ie. symmetric ciphers), $k$ must be secret. The sender and recipient must agree (somehow) on $k$. No-one else can be allowed to find out $k$. Anyone else who finds out $k$, can decrypt all the messages encrypted with $k$. For that reason, sy...
How would that work? I want to access Amazon securely using a symmetric algorithm. What do I use as the key? Symmetric algorithms require a shared secret, something the two parties can know that no attacker can know. Without one, you need an asymmetric algorithm.
As the finite field of GF(2^8) are isomorphic to GF((2^4)^2), GF((2^2)^4) and GF(((2^2)^2)^2), which of the field is best suited and most efficient for 4-bit MCU? would that be GF((2^4)^2) and why?
As the finite field of $GF(2^8)$ are isomorphic to $GF((2^4)^2)$, $GF((2^2)^4)$ and $GF(((2^2)^2)^2)$, which of the fields is best suited and most efficient for 4-bit MCU and why? Would it be $GF((2^4)^2)$?
Best choice of finite field for AES on a 4-bit microcontroller?
It is possible to implement AES on 4-bit microcontroller? As far as I know, AES on 8-bit microcontroller are common especially for light weight application such as the RFID. I have yet to come across AES been employed on 4-bit microcontroller, therefore I have been wondering whether such implementation is feasible.
Can one implement AES on 4-bit microcontroller?
**Disclaimer:** *You should probably talk to your advisor about this rather than the internet since your advisor will be responsable for supporting your project and judging it's results.* **Disclaimer2:** *My answer is probably more appropriate for a Computer Science or Mathematics Major. PulpSpy's [answer][1] is mo...
When I make a certificate like so cd /etc/openvpn/easy-rsa/2.0/ source ./vars . /etc/openvpn/easy-rsa/2.0/build-key client1 Then `commonName` is set to `client1`. When I ask the OpenVPN server what the commonName is of the user who is connected, can I then trust, that the user haven't altered his...
Is Common Name encoded in the certificate?
When I make a certificate like so cd /etc/openvpn/easy-rsa/2.0/ source ./vars . /etc/openvpn/easy-rsa/2.0/build-key client1 Then `commonName` is set to `client1`. When I ask the OpenVPN server what the commonName is of the user who is connected, can I then trust, that the user haven't altered his...
I am currently writing a payment system to accept payment details from an NFC enabled smartphone (BlackBerry 9900) to a Windows client (C#.NET) I am currently having two issues relating to security: 1) What is a good way to secure the data for transmission over NFC? I'm thinking public key encryption so that it c...
Secure way to transfer data over NFC?
I am currently writing a payment system to accept payment details from an [NFC][1] enabled smartphone (BlackBerry 9900) to a Windows client (C#.NET) I am currently having two issues relating to security: 1. What is a good way to secure the data for transmission over NFC? I'm thinking public key encryption so that...
I need some basic guideline on Password Based Key Derivation Function, how PBKDF1 generate key from password and salt using Hashing algorithm (SHA1, SHA256, MD5), What is the step behind this?
PBKDF1 as specified in [PKCS#5][1] and [RFC 2898][2] provides Key Derivation and Key Strengthening. The parameters of the function are a hash function (such as SHA-1), a password, a salt (sometimes called nonce, depending on context), an iteration count and the length of the derived key to be returned. The standard PBK...
I need some basic guideline on Password Based Key Derivation Function. PBKDF1 generates a key from password and salt using Hashing algorithm (like SHA1, SHA256, MD5). What is the step behind this?
How does PBKDF1 work?
PBKDF1 as specified in [PKCS#5][1] and [RFC 2898][2] provides Key Derivation and Key Strengthening. The parameters of the function are a hash function (such as SHA-1), a password, a salt (sometimes called nonce, depending on context), an iteration count and the length of the derived key to be returned. The standard PBK...
I am able to decrypt vigenere cipher text using the index of coincidence and chi test. However out of interested how do you go about attacking ciphertext that was encrypted using a mix alphabet shifted 26 times? Also what about a ciphertext that has been encrypted with 26 random alphabets? so each line in the t...
How to attack a general polyalphabetic cipher?
I'm writing a client-server encryption scheme for homework, and I've stumbled upon what might be a fatal blow to my current implementation. When using AES-256-CBC on the two sides, it's important that the client's encrypt context and the server's decrypt context remain in sync. However, my protocol allows for rejec...
Undecrypt using the OpenSSL EVP API?
> Also what about a ciphertext that has been encrypted with 26 random alphabets? so each line > in the tableau is random. If you mean that you use a repeating sequence of 26 random unique characters as the key, then you break it in much the same way as any other Vigenere cipher - n, in this case, is 26. If you me...
Why not use CTR with a randomized IV?
For optimum security, a random IV should be chosen for PBKDF2. I came across a scenario where I produce a hash of a random file that serves as the "password". Due to the nature of files, this has similar entropy issues as a "normal" password. What would happen now if I decided to take the same (low-entropy) ha...
Is there a known vulnerability when using identical key and salt with PBKDF2?
For optimum security, a random <strike>IV</strike>salt should be chosen for PBKDF2. I came across a scenario where I produce a hash of a random file that serves as the "password". Due to the nature of files, this has similar entropy issues as a "normal" password. What would happen now if I decided to take the ...
You say that a random IV "would also be unique", but really that is the crux of the problem. The problem with counter mode is that it is secure *unless* the same counter is used twice; if it is, it is likely that an attacker will be able to recover both plaintext messages. This contrasts with CBC mode, which if you r...
For optimum security, a random salt should be chosen for PBKDF2. I came across a scenario where I produce a hash of a random file that serves as the "password". Due to the nature of files, this has similar entropy issues as a "normal" password. What would happen now if I decided to take the same (low-entropy) ...
I have a few questions relating to threshold signatures: a scheme where $n$ participants hold a key share and any $t$ of them can conduct a protocol using their shares that results in a valid RSA or DSA signature being applied to a known message. Questions 1. Several techniques exist for threshold RSA ([1][1],[2...
If the same SALT is used for many passwords on a Linux server, in what way is that a security risk? Does the mean, that a user (which can change his own password) can calculate other users passwords? Or is brute forcing a rainbow table still required?
Passwords with same SALT. What does this mean?
Is there a way to generate a random number with given restrictions: - It will be used in a decentralised network with a big number of peers (no central authority to generate it) - Its generation should not rely on any third-party service (for example, going to a specific website) - Its generation is triggered b...
Is there some way to generate a non-predictable random number in a decentralised network?
Recently I've been trying to implement some Bitcoin-related code, and I've stumbled upon a weird concept, a SHA-256 "midstate". Some explanation is given [here][1]. The general concept is that Bitcoin relies on performing SHA hashing of a 128 byte data chunk many times, but only the second half of that chunk changes...
suppose we have 2 encrypted msgs with 2 different public key issued from the one server. there is a client who wants to send these to msgs to the server. in the middle there is an adversary, who eavesdrops all the communications, so he already got the 2 encryption keys and the 2 encrypted msgs. according to batch RSA, ...
Suppose we have two encrypted messages with two different public key issued from the one server. There is a client who wants to send these to messages to the server. In the middle there is an adversary, who eavesdrops all the communications, so he already got the two encryption keys and the two encrypted messages. ...
It's unclear to me if there are multiple problems, or a single one, (and just what that problem is) with servers incorrectly negotiating *down* from a client offering 1.1 or 1.2 to something they support like SSL 3 or TLS 1.0. [Eric Lawrence has said](http://blogs.msdn.com/b/ieinternals/archive/2011/03/25/misbehavin...
What is the 'Version Incompatibility" Problem in TLS 1.1/1.2 and 1.0?
Any techniques for evading frequency based crypt analysis without encrypting?
So my question what exactly is the MOV attack and how does it actually work and what is it used for ? It's explained briefly [here](http://people.cs.nctu.edu.tw/~rjchen/ECC2009/19_MOVattack.pdf) and I'd like to know what it is more / what is it fully used for? Thanks for any help
How does the MOV attack work?
What exactly is the MOV attack, how does it actually work, and what is it used for? It's explained briefly [here](http://people.cs.nctu.edu.tw/~rjchen/ECC2009/19_MOVattack.pdf) and I'd like to know what it is more / what is it fully used for.
What are the advantages of using static-ephemeral ECDH over ephemeral-ephemeral ECDH?
Given a pseudo-random function and assuming that we do not have any other tools, How can we construct a MAC? I believe this can be done. Would like to know if there is more than one way of doing this.
Realize a MAC using a Pseudo-random function?
I have two questions regarding the Block Cipher Modes: First: Which one of the modes is considered the best? I know CBC has a problem of IV since the next block of the plain text is XORed with the result of cipher text of the last block and the same with OFB. Is CTR the best one or not? Second: In "SSL with blo...
Which one of the Block Cipher Modes in the best?
Do anyone can explain or give a link to document about why Rijndaal won the AES, especially comparing it to other finalists (Serpent and Twofish). What criteria were used to make decision? Or is there detailed comparison of these algorithms including cryptographic strength, performance tests on different CPUs and mayb...
Which one of the Block Cipher Modes is the best?
I have two questions regarding the Block Cipher Modes: First: Which one of the modes is considered the best? I know CBC has a problem of IV since the next block of the plain text is XORed with the result of cipher text of the last block and the same with OFB. Is CTR the best one or not? Second: In "SSL with blo...
Which one of the Block Cipher modes is the best?
We know that exposing $p$, or $q$ or $\phi(n)$ results in trivial attacks on RSA since they allow us to factor $n$ and to compute the private exponent $d$. In OpenSSL (and most RSA implementations) decryption is done via the CRT, so we store $n$ and $d$, but also store $d \bmod (p-1)$ and $d \bmod (q-1)$ as CRT ex...
Exposing RSA private-key data... bad?
Can anyone explain (or give a link to document about) why Rijndaal won the AES, especially comparing it to other finalists (Serpent and Twofish)? What criteria were used to make decision? Or is there detailed comparison of these algorithms including cryptographic strength, performance tests on different CPUs and may...
Is it possible to predict a hash key based on half key? Let's have some example: i have 100000000 hash results, and they are generated by: sha256( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" . md5(random()) ); or sha256( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" . md5(random()) ); So, when someone generated a new sha256 ...
SHA-256 results group, is it possible?
Is it possible to predict a hash key based on half key? Let's have some example: I have 100000000 hash results, and they are generated by either sha256( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" . md5(random()) ); or sha256( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" . md5(random()) ); So, when someone generat...
Can one group the SHA-256 outputs depending on partial inputs?
When an elliptic curve-based cryptosystem is deployed, a single set of public parameters (consisting of a particular elliptic curve over a finite field as well as a generator of a prime order subgroup of its group of points) is typically shared across all users. Some of these public parameters are standardized in so...
There are a few more standards, with (sometimes) overlapping sets of parameters: - [ANSI X9.62][1] - [SECG][2] - [Brainpool][3] [1]: http://webstore.ansi.org/RecordDetail.aspx?sku=ANSI%20X9.62:2005 [2]: http://www.secg.org/?action=secg,docs_secg [3]: http://www.ecc-brainpool.org/
Suppose I am to design a request-response protocol (similar HTTP). For the sake of simplicity let us assume that this is a "chat" protocol where the client can only perform two actions: 1. Contribute a message to the chat, where the server responds verifying that the message was sent. 2. Request the chat contents...
Given a root hash root = H(plaintext) and two (or more) derived hashes h1 = H(salt1 + root) h2 = H(salt2 + root) would the knowledge of h1 and h2 alone increase the chances of finding the root hash or even the plaintext? I'm using SHA256.
Are derived hashes weakening the root?
Suppose I am to design a request-response protocol (similar HTTP). For the sake of simplicity let us assume that this is a "chat" protocol where the client can only perform two actions: 1. Contribute a message to the chat, where the server responds verifying that the message was sent. 2. Request the chat contents...
I have a few questions relating to threshold signatures: a scheme where $n$ participants hold a key share and any $t$ of them can conduct a protocol using their shares that results in a valid RSA or DSA signature being applied to a known message. Questions 1. Several techniques exist for threshold RSA ([1][1],[2...
The hidden subgroup problem is very useful for developing an understanding of pairing-based non-interactive zero-knowledge proofs. You would need a suitable elliptic curve of large composite order in order to use the hidden subgroup problem securely so in practice, you probably wouldn't bother as the implementation wou...
I am attempting to make a web-based secure password management and sharing utility, both as an academic exercise and to fully understand and feel safe about using it. I really like the idea of a 'host-proof' application, where encryption/decryption is done on the client side using javascript and only encrypted infor...
How can one share information using the 'host-proof' paradigm?
I am attempting to make a web-based secure password management and sharing utility, both as an academic exercise and to fully understand and feel safe about using it. I really like the idea of a ["host-proof"][1] application, where encryption/decryption is done on the client side using javascript and only encrypted ...
I'd like to build a simple password-protected symmetric key system. The key-creation process in my system operates as follows: 1. The system creates a 256-bit key purely at random. 2. The user chooses a password, which is hashed using SHA-256. 3. The system stores the value `key XOR SHA(password)`, which we ca...
Can I secure my key by XORing it with a hashed password?
I am wondering if there are any links to articles or resources available online that would help me to understand the concept of a public key ring, and why I might (or might not) want to publish my public key to one or another of them. In other words, I have a basic understanding (I hope) of how PKI works and why I'd p...
What are some advantages of using public key rings in cyptography applications?
I am wondering if there are any links to articles or resources available online, or explanations that you can give, that would help me to understand the concept of a public key ring, and why I might (or might not) want to publish my public key to one or another of them. In other words, I have a basic understanding (...
How do public key rings work in cryptographic applications?
"What would be the best theoretical way to store them, or how to encrypt them so that if attacker somehow gets encrypted pass phrase wouldn’t be able to decrypt both phrases?" If you really want to encrypt them, I suppose I would <br> recommend http://sourceforge.net/projects/ntru/. <br><br><br> "I know with bru...
I have only limited knowledge of cryptography and its algorithms, so I’m sorry if it’s a stupid question or if it's the wrong stackexchange site where i'm asking... Let's assume we have 2 phrases, one is the real password from a user, and the other is generated from the real password and almost impossible to guess. ...
If you are asking "how can the server verify that the password (or passwords in your case) that the user enters are valid", the standard answer to that is not to have the server encrypt the passwords at all. Instead, what we have the server do is store one hash of the two passwords. That way, if someone manages to br...
Let's assume we have 2 phrases, one is the real password from a user, and the other is generated from the real password and almost impossible to guess. You would need both to authenticate a user. What would be the best theoretical way to store them, or how to encrypt them so that if attacker somehow gets encrypted pass...
How can I store a combination of multiple pass phrases?
Through my reading about the generation of one-time password (OTP) I found that there are many algorithms that generate OTP and they are either based on time such as TOTP or based on mathematical computation such as HOTP and S/Key. The problem is they do not depend on some parameters to generate OTP. What I want to ...
Suppose there are $N$ parties $p_j$, each with a binary $b_j\in{\{0,1\}}$. The problem needs to compute the multiplication of number of ones times that of zeros, that is, $R=(\sum{b_j})\times(N-\sum{b_j})$. The computation should be secure in the sense that no party can know more than the final result $R$. For exam...
Wikipedia mentions ISO10126 Padding has been withdrawn, but doesn't say why. Also there were no news reports about this, as far as I can see. Why was it withdrawn? Are there security flaws? Is there maybe a new version?
Why was ISO10126 Padding Withdrawn?
Basically, any password is a string of letters and entropy can be easily calculated. For example you can use [Shannon entropy calculator][1] or by hand using scientific calculator. Entropy is calculated based on frequencies of letters in the password, it do not care about used language. So diverse passwords wit...
I have been looking for the algorithm that generates random number and this algorithm has to be more secure. I am going to use this algorithm to generate the salt that will be used in PBKDF2. Through my reading, I found that ISAAC is fast algorithm and better than RC4 but it is not good in terms of the security. ...
I was wondering why it is not more common to send the KCV of a secret key together with the cipher text. I see many systems that send cipher text and properly prepend the IV to e.g. a CBC mode encryption. Wouldn't it be easier to prepend another <blocksize> bytes with the KCV together with it? A good block cipher shoul...
Indeed, [ISO 10126-1:1991][1] and [ISO 10126-2:1991][2] titled _Banking -- Procedures for message encipherment (wholesale)_ have been withdrawn circa 2007. The padding specified by ISO 10126 was adding random until the message has length 7 (mod 8) bytes, then adding a byte coding the number of random bytes added, ma...
I suspect that KCV's are in general not used because they don't add enough to be worth the small overhead. There are a number of cryptographical attacks on encrypted methods that involve the attacker modifying a valid ciphertext, and then having the receiver decrypt the modified message (and watch how the receiver r...
Indeed, [ISO 10126-1:1991][1] and [ISO 10126-2:1991][2] titled _Banking -- Procedures for message encipherment (wholesale)_ have been withdrawn circa 2007. The padding specified by ISO 10126 was adding random until the message has length 7 (mod 8) bytes, then adding a byte coding the number of bytes added (including...
How can you put a backdoor into an encryption algorithm? Are there any techniques that can be used to reduce the time it takes to break a key? I am looking for practical examples encryption schemes that have backdoors, because they were designed to or new techniques exposed them. It is my understanding that you can ...
What is the best way to put a backdoor in an encryption system?
How can you put a backdoor into an encryption algorithm? Are there any techniques that can be used to reduce the time it takes to break a key? I am looking for practical examples encryption schemes that have backdoors, because they were designed to or new techniques exposed them. It is my understanding that you can ...
Indeed, [ISO 10126-1:1991][1] and [ISO 10126-2:1991][2] titled _Banking -- Procedures for message encipherment (wholesale)_ have been withdrawn circa 2007. The padding specified by ISO 10126 was adding random until the message has length 7 (mod 8) bytes, then adding a byte coding the number of bytes added (including...