encryption

Password encryption/ decryption code in .NET

I want simple encryption and decryption of password in C#. how to save the password in encrypted format in database and retrieve as original format by decryption, kindly anyone help with sample code. ...

lightweight RESTful PHP server

I want to write an extremely lightweight PHP server which handles data requests from remote clients. The data returned is tabular (like that of data read from a CSV file or a database table). The "problem" is that I could be returning potentially several hundred thousand rows of data - with a column width of between 10 - 15 (depending on...

Encryption: how to have 1 iv despite multiple fields

I've been stuck trying to arrive at a best solution for this for a while. I know that an initialization vector has to be unique for each item being encrypted. So if I'm encrypting an address and I have it stored all in a single field, I need a single iv for this. But if I have the address spread over multiple fields, I need several ivs, ...

how to send zipped (ASCII) data in an HTTP response from PHP

I am writing a service that sends data as a response, to a client. I am sending text (PLAIN ASCII) data, but I want to compress the data first (uzing any of the standard compression routines), and then send the compressed data back to the server, using the header() function etc. I am relatively new to PHP so having gathered the data, I...

Suggestions for a fast two way encrypt?

Can someone suggest a fast 2 way encryption algorithm for long ints? My candidates are: AES: the Advanced Encryption Standard specified by NIST FIPS-197. BLOWFISH: the Blowfish algorithm defined by Bruce Schneier. DES: the Data Encryption Standard algorithm defined by NIST FIPS-46-3. DESEDE: the "Triple DES" algorithm defined by NIST ...

PHP MD5 implementation

I'm currently attempting to code one for part of a college project - binary/hex handling and cryptographic functions are well regarded in the mark scheme, so I thought I'd kill two birds with one stone. However, the documentation availible on the algorithm itself is thorough but confusing. Is there a prexisting PHP libary/class that I c...

In ruby, how to decrypt a string which is encrypted by "crypted" method

In ruby, I encrypt a string using "crypt" method, for example: str = "123" strencrypt = str.crypt("aa") I want to decrypt from strencrypt and obtain the original string. How can I achieve that? I have tried to use crypt method again: str_ori = strencrypt.crypt("aa") But it can not return the "123". Anyone can help me? ...

php session encryption

I'd like to have sessions data encrypted like they are in suhosin, is there any library out there providing that? ...

Help in encrypting data between J2ME and .NET Web services

Hi guys, I have a requirement to encrypt data sent and received between J2ME and .NET Web services. I have tried using Bouncy castle but the encryption on J2ME and .NET side work independently (J2ME <-> J2ME // .NET <-> .NET) but are not working between each other (J2ME <-> .NET). If anyone has done this before. Can you share the fun...

Encrypting Connection String in web.config

How can we encrypt the connection string section in web.config file? ...

Generate RSA key pair and encode private as string

Ello guys, i am supposed to generate 512 RSA keypair and then encode my public key as a string. I cant find any good tutorial for someone who just begins with encryption....please advices, sample codes,help urgent!! ...

How to turn on Content Protection programatically on a Blackberry Device

We don't have BES deployed to set the IT policy and turn on content protection on the device. So, it has to be done programatically. I can see that such permissions can be requested by using ApplicationPermissions and ApplicationPermissionsManager. But after such permissions are given by the user, how to actually change the setting. I k...

What are the options available to encrypt a SQL Server Express database?

We have a team of sales persons who travel often carrying a laptop loaded with Sales data in a SQL Server Express database. What are the options available to encrypt a SQL Server Express database? ...

Transposition or Substitution Ciphertext? (monoalphabetic or polyalphabetic?)

Hi, We have a ciphertext with IC=0.0685. We want to find out the class descriptor (mono-alphabetical/poly-alphabetical/transposition). I have applied the 2 probabilistic tests to try and guess what class it belongs to. These tests are: Ratio of vowels to total (<25%) then more likely a substitution %ETAOS in text (<35%) then more likel...

How to encrypt something so that can be decrypted using any two of three keys?

So say I want to encrypt a file and the only way I want it to be read is if two different people enter their keys. So, for instance there are four keys: key1, key2, key3, key4. If I encrypt it with key1 then the following combinations will decypt it: key2,key3 key3,key4 key2,key4 Is this possible using a standard method? ...

Convert PHP encryption code to C#

Hi, I'm trying to convert this piece of code from PHP to C#. It's part of a Captive Portal. Could somebody explain what it does? $hexchal = pack ("H32", $challenge); if ($uamsecret) { $newchal = pack ("H*", md5($hexchal . $uamsecret)); } else { $newchal = $hexchal; } $response = md5("\0" . $password . $newchal); $new...

Thread & Queue vs Serial performance

I though it'll be interesting to look at threads and queues, so I've written 2 scripts, one will break a file up and encrypt each chunk in a thread, the other will do it serially. I'm still very new to python and don't really know why the treading script takes so much longer. Threaded Script: #!/usr/bin/env python from Crypto.Cipher ...

How to Pack/Encrypt/Unpack/Decrypt a bunch of files in Java?

I'm essentially trying to do the following on a Java/JSP-driven web site: User supplies a password Password is used to build a strongly-encrypted archive file (zip, or anything else) containing a text file as well as a number of binary files that are stored on the server. It's essentially a backup of the user's files and settings. Lat...

Make md5 strong

Im making a website that will intergrate with game that only support md5 hashing metod (atm). Which ofc is not especially safe anymore. But how could i make it stronger? Should I just generate long strings of random letters and numbers and hash them? But then the users have to save the password on a paper/txt file in computer. What do y...

I want to email users an encrypted file from a Django Backend Script on Ubuntu

I want to email users an encrypted file from a Django Backend Script (running through manage.py) on Ubuntu. How can I encrypt the data so that it is unreadable by 3rd parties who might intercept or even just read the email and will require a password string that I can supply to the end user via another method (not email.) What encrypti...