Tag Info

New answers tagged

0

The default mode will be MODE_ECB as detailed in the documentation. The different modes have already been described in this answer.


0

In general, producing symmetric keys from some "secret" is called key derivation and uses a key derivation function. There are several KDF designs out there; many protocols define their own (e.g. in SSL/TLS). In fact, exploring the details of SSL/TLS would be a good idea (pedagogically speaking). There is a current "push" for defining a standard ...


0

There's nothing wrong with just truncating SHA-256 output to whatever number of bytes you need. Also, even if you're using AES-128, you might benefit from extra available bytes, e.g. to initialise a IV (if you're using AES in a mode utilising IV) or to use as a MAC key (if you're using separate primitive to authenticate data).


0

It seems you are asking how to use the key to decrypt the Truecrypt volume with the key. This should point you in the right direction.


2

You can try to decrypt things using these keys :) First of all I would try to decrypt the hard disk (TrueCrypt) using the keys. Regarding OpenPGP you should know that the 2048-bit RSA key is only used to decrypt a symmetric key, which can be used to decrypt the message. It's a matter of performance. You you can try decrypting the message with one of the ...


3

There are several weird things in your setup: ECB mode does not use any IV. You should not specify an IV when using ECB mode. Or, rather, you should not use ECB, which is weak (generally speaking). AES processes binary input, produces binary output, and uses a binary key. There is no character string whatsoever in AES; thus, any notion of encoding like ...


3

A perfect block cipher is modeled as a pseudorandom permutation. For blocks of n bits, there are 2n! possible permutations; a perfect block cipher is as if the key was a random uniform selection of one permutation among all these. For a PRP, knowing many plaintext/ciphertext pairs (m, E(m)) gives you exactly zero information on the encryption of blocks m' ...


1

PGP, GPG, SSH, and most public key systems already use symmetric algorithms internally. Internally, when you encrypt with a public key, the software/hardware first generates a symmetric key and encrypts your data with the symmetric algorithm. And then it encrypts that symmetric key with the public key (using an asymmetric algorithm) and stores the encrypted ...


2

This is not a question of size. The raw asymmetric encryption algorithm known as RSA can do asymmetric encryption for a "message" in a rather limited space; namely, with a 2048-bit RSA key and PKCS#1 v1.5 RSA encryption, the algorithm can process a sequence of bytes up to 245 bytes at most. But you never use the raw algorithm. You use a protocol, in this ...


0

I'm currently using GPG RSA keys to encrypt binary files. Many people recommend using symmetric keys to encrypt large files, and then encrypt the symmetric key with a public key. This is known as hybrid cryptosystem and is the way it is usually done, especially when the data sizes get bigger. Symmetric encryption by its very nature is always going to be ...


1

Any file size really. Symmetric cryptography provides a much, MUCH higher level of security. This is why we can use 128 bit symmetric algorithms but have to use 1024 or 2048 bit asymmetric algorithms. There are also a few attacks that make it easier to figure out certain asymmetric algorithms if you have a larger amount of structured data encrypted with ...


-1

I think you should look at a more standard approach to store and forward, which is similar to the S/MIME encrypted email method. Take a look at PKCS#7 and XML Encryption standards. These types of protocols work where the sender of the message looks up each recipient's certificate in the user store. The sender generates a symmetric key (AES is just fine) for ...


1

Several ways of encrypting data using AES is located here. It uses a high level library such as Bouncy Castle, or .NET to implement authenticated encryption using AES GCM


3

Using the same key for two distinct algorithms incurs the risk of interactions. An extreme example is when you use both AES/CBC for encryption and CBC-MAC as MAC algorithm: if you use the same key for both, then it is pretty obvious that the MAC can be trivially worked around. For AES/CBC + HMAC, the gut feeling of most cryptographers is that the two ...


1

If the question is understood properly, what is really asked here is how to do a key-exchange. Having implemented this in the same manner discussed for a security product, the following general approach works independent of the underlying transport protocol (and further does not make any assumptions about its underlying security): Client generates a ...


2

Both answers have identified SSL/TLS, but consider adding client authentication to the mix. This will guarantee that the server will only accept connections for authenticated / known clients. The drawback with this is that: a) Each client must be issued with its own client authentication certificate (although not necessarily from the same CA as the ...


4

Secure Sockets Layer (SSL) seems to be the answer you are looking for. Here's a quote from the Wikipedia page: They use X.509 certificates and hence asymmetric cryptography to assure the counterparty with whom they are communicating, and to exchange a symmetric key. This session key is then used to encrypt data flowing between the parties. This allows ...


4

What you are looking for is a public/private key pair otherwise known as SSL in the computer world. An SSL certificate as you mentioned is enough security since to find out what is being sent you need the private key of the certificate and you cant get that without breaking into the server. If you don't want to use SSL another option would be to use a ...


4

"Additional authenticated data" is whatever you wish it to be. GCM is an authenticated encryption mode in which the inputs are: a key K suitable for AES (128, 192 or 256 bits); a 96-bit IV; some plaintext data P whose length is at most 239-256 bits (i.e. about 68.7 gigabytes); some additional data A whose length is at most 264 bits (i.e. about 2.3 millions ...


1

This is called a "known plaintext attack" (not to be confused with a chosen plaintext attack). There is a known plaintext attack called XSL which some people believe could work on AES, but it is important to point out that even if it did work, it would still take hundreds of trillions of years to break the encryption. (That counts as working in ...



Top 50 recent answers are included