des

How to encrypt an NSString in Objective C with DES in ECB-Mode?

Hi, I am trying to encrypt an NSString in Objective C on the iPhone. At least I wan't to get a string like "TmsbDaNG64lI8wC6NLhXOGvfu2IjLGuEwc0CzoSHnrs=" when I encode "us=foo;pw=bar;pwAlg=false;" by using this key: "testtest". My problem for now is, that CCCrypt always returns "4300 - Parameter error" and I have no more idea why. Thi...

BitShifting with BigIntegers in Java

I am implementing DES Encryption in Java with use of BigIntegers. I am left shifting binary keys with Java BigIntegers by doing the BigInteger.leftShift(int n) method. Key of N (Kn) is dependent on the result of the shift of Kn-1. The problem I am getting is that I am printing out the results after each key is generated and the shiftin...

Howto display or view encrypted data in encrypted form?

In the Wikipedia Article on Block Cipher Modes they have a neat little diagram of an unencrypted image, the same image encrypted using ECB mode and another version of the same image encrypted using another method. At university I have developed my own implementation of DES (you can find it here) and we must demo our implementation ...

Des decryption returns empty

Hi, I am using Des.php for decryption. For few texts descript function returns Correct output in readable text format. For few... it just returns blank(empty.) After debugging in Des.php, i found that function _unpad($text) is returning false. The input $text is also still encoded. What could be the reason? Whenever decrypt fun...

Using function pointer member variables within an Objective-C Class

Hi, (New to Objective-C, but well versed in C/C++). Presently I have an Objective-C class and a number of its member variables will be function pointers. These function pointers will only be modified by the class itself, but may be used by other classes. I'm not sure how to set up access to said function pointers. The solution I cur...

VB, problem with DES MD5

Hello guys I am trying to migrate a java code to vb, now I need to duplicate the des encription but I am having trouble with this part. I admit I havent dont encryption since college. This encrypt the key using md5, and send it to a fuction for the des encryption, seems I got a clue of the error, the key must be a 8 digit key and I am ...

how to load an rsa privated key encrypted with des in java

hi, in my job i was assigned a task in which i have to programmatically load a private and public keys from files and then store them in a .jks file,the private key was generated using openssl, its an rsa des encrypted key in der format,i have no problem loading the public key, however,i haven't found a way to load the private key in its...

What is CAPICOM DES doing under the hood?

I found a link that explains what CAPICOM does for 3DES (Understanding Capicom), but I'm not sure if this is directly applicable to the single DES algorithm that CAPICOM does. It seems that CAPICOM does some proprietary stuff to derive the actual key it uses to encrypt. It also puts a lot of header information in front of the encrypted ...

Encrypt with PHP and Decrypt with Java

I have to write a program to decrypt a message using JAVA. The message is encrypted using Triple DES / ECB implemented in PHP. I have tried a few different settings on the algorithm, mode, and padding schema. I do not get the correct result. What is missing? Here is the PHP program that encrypt the message: $config_mcrypt_ecb_key = "1...