encryption

What's the difference between SHA and AES encryption ?

What's the difference between SHA and AES encryption? ...

Java 256bit AES Encryption

I need to implement 256 bit AES encryption, but all the examples I have found online use a "KeyGenerator" to generate a 256 bit key, but I would like to use my own passkey. How can I create my own key? I have tried padding it out to 256 bits, but then I get an error saying that the key is too long. I do have the unlimited jurisdiction pa...

Why shouldn't a private key be stored verbatim or in plain text on the local computer?

I was reading this: http://msdn.microsoft.com/en-us/library/tswxhw92(VS.80).aspx The first sentence says: "Asymmetric private keys should never be stored verbatim or in plain text on the local computer." What's the problem with this? And how does a key container solve it. The reason I'm asking is that I want to generate an asymm...

Refactor this block cipher keying function

I found a simple pure python blowfish implementation that meets my needs for a particular project. There's just one part of it that bothers me: def initialize(key): """ Use key to setup subkeys -- requires 521 encryptions to set p and s boxes. key is a hex number corresponding to a string of 32 up to 448 1s and 0s -- k...

How to decrypt a data using rsa privatekey

I am using JAVA My friend uses SYMBIAN I and my friend have same rsa modulus. If I encrypt the data using public key then my friend is able to decrypt the same. But if my friend encrypt the data with public key then I am not able to decrypt the data. I got an error as "Data must start with zero " public static byte[] encrypt(byte[] enc...

How To Reversibly Store Password With Python On Linux?

First, my question is not about password hashing, but password encryption. I'm building a desktop application that needs to authentificate the user to a third party service. To speed up the login process, I want to give the user the option to save his credentials. Since I need the password to authentificate him to the service, it can't b...

Encrypt in Java and Decrypt in C# with Rijndael

Using the Rijndael algorithm is it possible to encrypt a config file (or section(s) in a config file) and then decrypt that file in Java? Assumptions can be made such as: Pass in IV (not Autogenerated idea :: GenerateIV(); ) Pass in Key BlockSize is 128 (standard) Assuming this can be done, my next question on this would be: Can th...

Protect.exe for AutoLISP code protection

I am developing an architectural LISP-based package for a member of the IntelliCAD consortium. Per recommendations I have found on websites, I have used the Kelvinator to deformat and disguise some of the code. Now I am attempting to use Protect.exe to encrypt the code. The exe seemed to work until I tried to put use a folder name in ...

Calculate maximum size for encypted data

Is there any way to calculate the largest outcome from an Rijndael encryption with a fixed array lenght? Encryption method: RijndaelManaged Padding: PKCS7 CipherMode: CBC BlockSize 128 KeySize: 128 I need this as im converting a database where all string are going to be encrypted so i need to change the size of all string fields. ...

Encrypt in JSP, Decrypt in PHP

Hi, I'm trying to implement a single-sign-on link from application written in JAVA, to another web app written in PHP. I'd like a way to encrypt the username in .JSP and then decrypt in PHP. I need to find functions matching functions that will allow this. ...

What security landmines should I look out for with JCA and AES?

I'm using the Java Cryptography API with AES to encrypt short strings of text for use in user identifying cookies. It's my understanding that some encryption algorithms are not secure when used with small amounts of text when compared to the size of the key. What do I need to know in order to make sure that I am not leaving my data inse...

Encrypting objects

hi I have a class like Employee. This class has some fields like Id,Name,Surname, Tasks( a string array) , isManager , TaskDueDates ( a date-time array). I want to generate a text from this object. I think to use seperators, this is a basic solution. For example my text can be: 13;George;Smith;{"Task1","Task2","Task3"},false, {this nig...

Java equivalent of C#'s Rfc2898DerivedBytes

Hi. I was wondering if anyone have tried to do an equivalent of Rfc2898DeriveBytes key = new Rfc2898DeriveBytes(secret, saltValueBytes); byte[] secretKey = key.GetBytes(16); in Java. Where secret is a string(password), and saltValueBytes is, well, a salt in byte array. I've tried stuff, but can't seem to wrap my head around it. Tha...

Can I used encrypted connections with Oracle Instant Client and ODP.NET?

We're currently using a fully installed oracle client and ado.net via odbc to establish an sql*net encrypted connection to an oracle database. My question is if we can achieve encrypted connections with the instant client and odp.net instead of full client and odbc, too? Thanks in advance! ...

Storing passwords that can't be hashed in a server application

I have a .NET server application that must store passwords that can't be hashed because some APIs I use need the passwords in plain text. These passwords can also be exported and imported as part of the system configuration into another server instance of the application or for backup purposes. The encrypted data will definitely need ...

How to do PGP in Python (generate keys, encrypt/decrypt)

I'm making a program in Python to be distributed to windows users via an installer. The program needs to be able to download a file every day encrypted with the user's public key and then decrypt it. So I need to find a Python library that will let me generate public and private PGP keys, and also decrypt files encrypted with the publi...

Transfering encrypted data server to server, between 2 PHP scripts

I need to transfer data from a PHP script on my local server to a remote API (also written in PHP) on my hosting server. It is basically a primitive version control system, and I use both HTTP GET and HTTP POST to transfer files and strings. I would like the connection encrypted, but my (shared) web host tells me I can't use SSL because...

Is my authentication encryption any good?

So I've been reading a lot about encryption in PHP. So much that I am not sure exactly what's a really good method to securely store login information. However, the following function is what I came up with: function loginHash($username, $password){ $salt = str_split($password,(strlen($password)/2)+1); $hash = hash('whirlpool',...

Practical applications of homomorphic encryption algorithms?

It appears there there were interesting things going on in cryptography: the first homomorphic encryption scheme appeared recently (explanation, HT). Roughly speaking, it is a way of encoding x into f(x) such that you can compute f(x+y) easily knowing f(x) and f(y) even though you can't easily restore x and y (and same for f(x*y)). What...

Transferring cryptographic initialization vectors

I want to know the best way of transferring a cryptographic initialization vector (IV) from the place where my data is encrypted to the place where my data is decrypted. In other words, the IV should be randomly generated every time you encrypt a message (right?), so there needs to be some way of finding the IV when you decrypt. I have...