Tag Info

New answers tagged

-1

im a noobie myself, working on a security system myself now, so im going to share my findings, googling them will get you far. for all i discovered, the AES and MD5 encryptions are concidered unsafe. the encryptions SHA512, SHA232(or whatever) and Whirlpool came out the best. Sending non-encrypted data over a HTTPS stream is not as faulty as on a HTTP ...


2

Let's try... First, I create a 500 MBytes file full of random bytes: dd if=/dev/urandom of=/tmp/foo bs=1000000 count=500 then I encrypt it using GnuPG, measuring the time taken by that process ("keyID" is the UID of the public key I am using): time gpg -r "keyID" --cipher-algo AES256 --compress-algo none -o /tmp/bar --encrypt /tmp/foo Total time on my ...


2

You have not found a bug in OpenSSL, not a real one. You may have found a gap in your understanding, though. Namely, encryption works on bytes and produces bytes. What you see with your eyes are characters. In order to accommodate character-oriented devices (e.g. your eyes), OpenSSL applies an extra encoding on the encryption output: it takes the bytes and ...


0

The trailing == is the Base64 indicator for the end of the encoded data. There's a technical difference between ending with = and ==, involving how many bytes are in the last block (24 bits), but your bytes may line up such that it doesn't matter. You're causing OpenSSL to interpret your Base64 string as 3/mEwtZdIuIV5wwsQAcnAw= with some trailing garbage. ...


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 ...



Top 50 recent answers are included