encryption

How does a cryptographically secure random number generator work?

I understand how standard random number generators work. But when working with crytpography, the random numbers really have to be random. I know there are instruments that read cosmic white noise to help generate secure hashes, but your standard PC doesn't have this. How does a cryptographically secure random number generator get it...

Java encryption : which method can get me a shorter message ?

I don't know too much about encryption, I just want to ask, which method can get me the shortest result message ? For instance, the message looks like this : "This is the secret input message", I wonder if the encrypted message can be shorter then the above 32 characters long ? Maybe something like "dfkfjkvf12". Frank ...

Java encryption : which method can get me a result message without strange characters ?

I want to put an encrypted license list on the web, so that valid users can use my app to get that list and check to see if their license Ids are on the list, so the apps can be activated. I've noticed some methods generate encrypted strings like this "M°+{Î..." with lots of strange characters in it, I wonder which method can generated r...

Javascript digital signatures

To create a digital signature with the client certificate in javascript, there was a function: crypto.signtext() that doesn't work anymore What is the easiest way to do this now? ...

Encrypting XML database in python

i am using XML as my backend for the application... LXML is used to parse the xml. How can i encrypt this xml file to make sure that the data is protected...... thanks in advance. ...

iPhone 3DES encryption key length issue

Hi, I have been banging my head on a wall with this one. I need to code my iPhone application to encrypt a 4 digit "pin" using 3DES in ECB mode for transmission to a webservice which I believe is written in .NET. + (NSData *)TripleDESEncryptWithKey:(NSString *)key dataToEncrypt:(NSData*)encryptData { NSLog(@"kCCKeySize3DES=%d", kCCKeySi...

git encrypt/decrypt remote repository files while push/pull

Is it possible to automatically encrypt files via 'git push' before transferring to a remote repository? And automatically decode them while 'git pull'. I.e, if I have some remote server with shared access with git repository there, and I don't want to our project was stolen without a permission... Maybe there is some special git-hooks ...

Somebody is storing credit card data - how are they doing it?

Storing credit card information securely and legally is very difficult and should not be attempted. I have no intention of storing credit card data but I'm dying to figure out the following: My credit card info is being stored on a server some where in the world. This data is (hopefully) not being stored on a merchant's server, but at s...

Encrypting the connection string in web.config file in C#

I have written the name of my database, username and password in my web.config file as connection string. I want to encrypt this data. How can I do it? <connectionStrings> <add name="ISP_ConnectionString" connectionString="Data Source=JIGAR; Initial Catalog=ISP;Integrated Security=True; User ID=jigar;Passwor...

equivalent method of gnupg.GPG and gpg.import_keys(pub_key).summary() in php

gpg = gnupg.GPG(gnupghome="/tmp/foldername", verbose=True) print "Import the Key :", gpg.import_keys(pub_key).summary() this two lines of code gives me public key exract which i further used in encryption. i need to get the equivalent metods in php . ...

Java Encryption issue

I am using PBE encryption to encrypt and decrypt some text on an Android application but I get the BadPaddingException: with the "pad block corrupted" message when I use the wrong private key to decrypt the text. My question, since I am not well versed with encryption in Java, is if this is the normal behavior of the encryption API, be...

tripledes encryption not yielding same results in PHP and C#

When I encrypt with C# I get arTdPqWOg6VppOqUD6mGITjb24+x5vJjfAufNQ4DN7rVEtpDmhFnMeJGg4n5y1BN static void Main(string[] args) { Encoding byteEncoder = Encoding.Default; String key = "ShHhd8a08JhJiho98ayslcjh"; String message = "Let us meet at 9 o'clock at the secret place."; String encryption = Encrypt(message, key, fa...

encryption in php

$key = file_get_contents('http://keyserver.pramberger.at/pks/lookup?op=get&amp;search=userid'); this code gives me public key with the html tag .how to extract the public key block form begin pgp public key block ---to---- end pgp public key block and using this public key i need to encrypt the data .i need to do it in php. ...

Encrypting socket communication with RSA in C#

I'm currently trying to implement a socket server that enables the clients to send some commands to start and stop various services that the server provides. I got the communication between client and server running, and got the server to respond to the commands the clients send. The next step would be to encrypt the communication betwee...

How can I create a SecKeyRef object (in iPhone sdk) from a already generated public key file?

I am trying to implement RSA encryption logic in a iPhone app. I have created two seperate public and private key file using Java API. As per our requirement we will have to encrypt few secured data(inside iPhone client app) using previously generated public key file before sending it to J2EE based server. How can I create SecKeyRef obje...

How do encrypt a long or int using the Bouncy Castle crypto routines for BlackBerry?

How do encrypt/decrypt a long or int using the Bouncy Castle crypto routines for BlackBerry? I know how to encrypt/decrypt a String. I can encrypt a long but can't get a long to decrypt properly. Some of this is poorly done, but I'm just trying stuff out at the moment. I've included my entire crypto engine here: import org.bouncycas...

php script to call gpg commands

system() call in php used to call external program .How can i call gpg (gnupg commands) for encryption through php script. ...

RSA Encrypt / Decrypt Problem in .NET

I'm having a problem with C# encrypting and decrypting using RSA. I have developed a web service that will be sent sensitive financial information and transactions. What I would like to be able to do is on the client side, Encrypt the certain fields using the clients RSA Private key, once it has reached my service it will decrypt with th...

Simplest method of hiding sensitive information

What is the simplest way I can hide a sensitive identifier, while providing some equivalent means of identifying the data from outside? For example, lets say I have a database table with records and one of them is an sensitive ID field. ID 2A 1S etc... then I want to have a second record: ID PublicID 2A AXXX44328 1S KKKZJS...

Hiding a value in an Android application

Hi, I need to hide a value in a mobile (Android OS) application. As far as I can see, encrypting the value is of no use as the key to the encryption mechanism must be available to the program and is thus available to an attacker reverse-engineering the code. So, it seems that the only "solution" is to hide the secret value in the applic...