encryption

Hash Collision in fairly simple encrypt/decrypt code

I'm trying to add a small level of security to a site and encode some ids. The id's are already a concat of linked table rows, so storing the encryption in the db isn't very efficient. Therefore I need to encode & decode the string. I found this great little function from myphpscripts, and I'm wondering what the chances are of collisio...

Is it possible to use the PhysFS library with encrypted zip files?

Is it possible to use the PhysFS library to read and write encrypted zip files? ...

C# encryption in the age of reflector

Hi everyone, I have a program, where the password to a database is set by a remote user. The program saves the username and password to an encrypted string in an xml file that otherwise should be human readable. Now, this works fine, I use the C# DES encryption with a key, and it get encrypted and decrypted. Now, the problem is that any...

What block cipher mode to use? CFB adequate?

I want to use AES to encrypt some data of arbitrary length, and I'm wondering what block cipher mode I should use. http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html recommends AES in CTR mode. I'm writing a Ruby on Rails plugin, and unfortunately OpenSSL (which Ruby has standard bindings for) doesn't support CTR...

Pad byte[] to 16-byte multiple for AES Encryption

I currently have a function [C#] which takes a byte[] and an alignment to set it to, but during encryption, an error is thrown every once in awhile. private byte[] AlignByteArray(byte[] content, int alignto) { long thelength = content.Length - 1; long remainder = 1; while (remainder != 0) { ...

Writing an encrypted cookie session store for Rails; is my approach secure?

By default, Ruby on Rails stores session data in cookies. This has many advantages, such as the lack of need to setup any persistence layers on the server side. However, the session data is not encrypted, and the Rails app that I'm writing puts potentially sensitive data in the session. I'd like to avoid storing session data server-side ...

Generating REALLY big primes

I'm playing around and trying to write an implementation of RSA. The problem is that I'm stuck on generating the massive prime numbers that are involved in generating a key pair. Could someone point me to a fast way to generate huge primes/probable primes? ...

Taking credit card information online without processing -- how best to do so?

I have had a number of requests from clients wanting to take a customer's credit card number online and then process the payment in store at a POS of terminal. I'm wondering what the best method of doing this is. I don't want to store the credit card number on the server in plain text and I don't want to send an email with the number in...

Is encrypting web.config pointless?

I was reading a blog today (http://somewebguy.wordpress.com/2009/07/20/is-encrypting-your-web-config-a-waste-of-time/) about both how to encrypt your appsettings/connectionstrings etc. using the aspnet_regiis tool. He has a follow up post with some feedback from others saying this is a waste of time. My question is, what do you think?...

Load an encrypted XML file into a Dataset

I'm trying to decrypt an encrypted XML file and put it into a stream then load it into a dataset. I am able to do this if I decrypt the file, and write it back as a file. Then do the Dataset.ReadXML method. However, so I don't defeat the purpose of the encryption I'd like to leave it in memory. I see that .ReadXML does accept a syste...

Sharepoint and encryption

I'm currently setting up WSS 3.0 at my work, and I'm in the finance section of it. My question is, is there a possibility to encrypt and decrypt lists? And I mean entire lists, because the document libraries will have different types of files in it, from Word to Invoices in InfoPath. I know there is a solution in CodePlex called Crypto...

Create ZIP with AES encryption on Solaris

Hi, Is there a way to archive & encrypt a file using AES on Solaris and be able to unencrypt & unarchive it with winzip? Thnaks! Mark ...

What is the best way to hide/encrypt a String in ObjC/C?

I have a string in my code that I use as a secret when I communicate with my server. What is the best way to encypt this string to ensure that a hacker will not be able to find it out by searching my binary or looking into the memory during run time? (if possible to prevent at all?) What are some measures you would suggest to at least m...

using RSACryptoServiceProvider or RSA in hosted environment

I would like to use Public/Private encryption where my web app would sign an xml document or a piece of data using a private key and it will be verified in the application using the public key, Is it possible to use RSACryptoServiceProvider in .net 2.0 hosted environment if not what are other possible workarounds? ...

SQL 2008 Encryption Scan

We recently upgraded a database server from SQL 2005 to SQL 2008 64 bit. CPU utilization is oftentimes running at 100% on all four processors now (this never happended on the SQL 2005 server). When I run sp_lock I see a number of processes waiting on a resource called [ENCRYPTION_SCAN]. I am not using any SQL 2008 encryption features. Do...

Encrypting War files

Hi all, I would like to encrypt or obfuscate my WAR file so that reverse engineering will take a little more effort. Is there such a tool or maven plugin that will encrypt a WAR file and its contents? Also, once the WAR is encrypted, how will the Web Application be deployed at that point? If the web server explodes the WAR, can each ...

Php, should i use sha1 or others version of sha? Whats are the differences?

Hi, I am going to generate a random password for my users. Probably I will use salt and sha1 method. But I found that there are other version of sha1, like sha256, sha512 etc. What is the differences between the sha versions? Which one better, more secure, and faster (performances)? Which one should I use?? EDIT: I am php user, thank...

Python: encryption as means to prevent data tampering

Many of my company's clients use our data acquisition software in a research basis. Due to the nature of research in general, some of the clients ask that data is encrypted to prevent tampering -- there could be serious ramifications if their data was shown to be falsified. Some of our binary software encrypts output files with a passw...

Recommended .NET encryption library

After reading (yet another) post by Jeff more or less concluding that us mortal developers shouldn't be getting too involved with encryption, I'm left wondering what library I should be using. The only two libraries I've found that seem legitimate are entlib's and bouncycastle, but they don't seem much more of an abstraction than the .NE...

Error due to encryption in the command "cp -R /Users/me/cs_project /Users/cs/"

Problem: to copy a directory tree from the "me" master user to the encrypted harddrive of the "cs"-user: su cs bash-3.2$ cp -R /Users/me/cs_project /Users/cs/ cp: /Users/cs/cs_project: Permission denied cp: /Users/me/cs_project/h_mark: unable to copy extended attributes to /Users/cs/: Permission denied cp: /Users/cs/: No such file or ...