encryption

Fractal Encryption

I've heard that one can encrypt data using drawings of the Mandlebrot set, and that this encryption algorithm is quantum-safe (can't be broken with a quantum computer, unlike many commonly-used algorithms). I looked around on Google for more information but I've only come across some articles intended for a more non-technical audience. ...

Which is more secure OFB or CFB?

I'm working a small project, using AES encryption and wanted to use it in streaming mode, which is considered a more "suitable" mode for socket usage? OFB or CFB? I've been reading about it and can't really decide, so any ideas are highly appreciated. I'll be using OpenSSL/C++. ...

few characters missing after decryption.

Hi, This is my original xml: <?xml version="1.0" encoding="UTF-8"?> <table> <row> <id>12</id> <name>Mickey Mouse</name> </row> </table> This is the output after going through encryption/decryption process <?xml version="1.0" encoding="UTF-8"?> <table> <row> <id>12</id> <name>Mickey Mouse</name> </...

How to choose an AES encryption mode (CBC ECB CTR OCB CFB)?

Which of them are preferred in which circumstances? I'd like to see the list of evaluation crtieria for the various modes, and maybe a discussion of the applicability of each criterion. For example, I think one of the criteria is "size of the code" for encryption and decryption, which is important for micro-code embedded systems, lik...

Can I exploit GPU to do AES encryption from .NET? If so, how?

Interesting paper from Trinity College of Dublin: AES Encryption Implementation and Analysis on Commodity Graphics Processing Units Their technique uses openGL to enlist the GPU to do the numeric transforms required by AES. How difficult would it be to expose this capability - performing stream encryption - via a managed .NET library?...

How do I generate an RSA public/private key in .Net, of a specific length?

I'm using the RSACryptoServiceProvider to do some asymmetric encryption. As per MSDN, when you instantiate a new RSACryptoServiceProvider, you get a public/private key pair generated for you that you can use. Clearly this pair is being generated using some defaults - specifically the length. I'd like to specify my own length for great...

Which symmetric encryption algorithm is the fastest for smaller messages?

I am interested in help selecting one of the common symmetric encryption algorithms (Twofish, AES, etc) based on performance criteria (fastest encryption/decryption). We are currently leaning toward AES, but since the communications we are sending back and forth don't really need that level of encryption, a less secure algorithm would b...

What should every web developer know about encryption?

I've just landed a PHP5 gig. I won't be handling the parts of the application that involve super sensitive data, but I still know embarrassingly little about security and encryption methods. I only know the very basics (don't store passwords in plaintext, don't allow users to run code using post data, etc). What do I need to know to keep...

public key crytography implementation

Hi Guys, I have been using the PHP mcrypt module for encrypting sensitive data at my company. This has been working well. However, I have been requested to create a new master password which should be able to decrypt any data. The problem is that this master password would have to be hardcoded in a script file. Please correct me if I am...

Java cipher.doFinal() writing extra bytes

I'm implementing encryption / decryption using Java Cipher and AES. Everything is working well except that there's 5 extra bytes written on the call to doFinal(). So, I end up with a correctly decoded string with 5 extra bytes appended. I believe the reason is that the entire block of 16-bytes is being written. I see 3 16-byte blocks...

Encrypted Fields & Full Text Search, Best Approach?

I've got some fields that store notes and sensitive information that I'd like to encrypt before it makes its way into the database. Right now, I use a SQL Full-Text Search to search these fields. Obviously encrypting this data is going to throw off my search results. What's the best way to encrypt these fields, but still allow searchi...

How do I generate a common hash from multiple passwords?

I've got an app that generates a hash off of a user password, which I then use to encrypt data with. I want to extend this to the case where any 2 out of 5 users need to authenticate the app before it has enough data to generate that hash. The problem I've got is I need to generate the exact same hash no matter which 2 of the 5 users au...

Encryption: reversing bitwise and bitshift?

I'm trying to reverse an XOR encryption. I have the encryption code: // Walk the 16 nibbles in the 64 bit long long, selecting the corresponding key digit // and XORing it into the result. unsigned long long result = 0; for( i=0; i<16; i++ ) { int n = 4*(i % keyLen); int k = (key & (0xF << n)) >> n; result |= value&(0xF << 4...

Generate authenticated CMSEnvelopedData Messages with bouncycastle

I am trying to encrypt data with a password and store it inside a ASN.1 encoded CMS message (using C# and BouncyCastle 1.4) The code I have seems to have two problems: the data does not seem to be signed with a HMAC, so when I tamper with the encodedData (by enabling the commented out line), the decryption still succeeds. when I decry...

Is it possible to decrypt md5 hashes?

Someone told me that he has seen software systems that would accept MD5 encrypted passwords (through various integrations with other systems), decrypt them, and store them in the systems own database using it's own algorithm. Is that possible? I thought that it wasn't possible (feasible) to decrypt MD5 hashes. I know there are MD5 dic...

MVC using Linq to Entity w/ sql encryption

Currently i am using sql encryption and would like to continue using it through Linq. I have all my CRUD stored proc's wired up to the table in order to handle the encryption/decryption on the backend. Problem is my database model see's a field type of varbinary(max) which is used for the sql encryption storage. The retrieval sp for t...

Password handling best practices?

We have a number of network services and web-apps authenticating users differently, some with different password requirements for very bad technical reasons. For example, one system refused $ signs until someone "fixed" the string handling in some Perl scripts. Another system appears to parse @ signs in passwords. Another system issues u...

Do many small files encrypted with the same cipher and key pose a security vulnerability?

I am curious, if I have many files, some as big as a few k, some as little as 2, 4, 8 bytes. Will there be a security hole? What if I have 10,000 files on a single disc all encrypted with the same algorithm (lets say SHA512 since I know SHA512CryptoServiceProvider exist) Would that be a security vulnerability? Since so many files use th...

Encryption app for CD arch, does this sound secure?

I am thinking writing an app to encrypt many files before burning to disc. I burnt a disc with truecrypt and had problems copying the good files when the volume have bad sectors (http://serverfault.com/questions/48839/backup-on-disc-using-truecrypt-corruption-problem). I am not doing a complex application nor want to replace truecrypt an...

Decrypt BlowfishEasy encrypted file in PHP

I am trying to figure out how to decrypt a file that is encrypted with BlowfishJ.BlowfishEasy. Anyone who has Java and PHP experience and would be willing to help would be great! BlowfishEasy Class: https://opensource.at.northwestern.edu/trac/filebridge/browser/tags/1.0.2/source/encryption-src/BlowfishJ/BlowfishEasy.java Decrypt Call C...