decryption

How to encrypt/decrypt multiple strings in AES encryption??

hello again everyone, i would like to know if i could encrypt two or more strings in AES encryption. let say, i want to encrypt username, password and nonce_value, can i use the following code? try{ String codeWord = username, password, nonceInString; String encryptedData = aseEncryptDecrypt.encrypt(codeWord); String decryptedData =...

how to display the decrypted and splited Strings in order?

Hi everyone, i need some help and guidance in displaying the splitted Strings in order. let say, i have username, password, nonceInString. i had successfully encrypted and decrypted those. then i split the decrypted data. it was done, too. i want to display the decrypted data in order. something like this. userneme: sebastian...

RSA encryption results in server execution timeout

Hi, I am using PHP Crypt_RSA (http://pear.php.net/package/Crypt_RSA) for encrypting and decrypting the contents. Contents are of 1kb size. Following are the results: keylength = 1024 Encryption function takes time: 225 secs keylength = 2048 Encryption function takes time: 115 secs I need to reduce this execution time as most...

Exception - Illegal Block size during decryption(Android)

I am writing an application which encrypts and decrypts the user notes based on the user set password. i used the following algorithms for encryption/decryption 1. PBEWithSHA256And256BitAES-CBC-BC 2. PBEWithMD5And128BitAES-CBC-OpenSSL e_Cipher = Cipher.getInstance(PBEWithSHA256And256BitAES-CBC-BC); d_Cipher = Cipher.getInstance(...

Python byte per byte XOR decryption

I have an XOR encypted file by a VB.net program using this function to scramble: Public Class Crypter ... 'This Will convert String to bytes, then call the other function. Public Function Crypt(ByVal Data As String) As String Return Encoding.Default.GetString(Crypt(Encoding.Default.GetBytes(Data))) End Function ...

Encryption / Decryption Sugestions

Is there a way to encrypt any string or file of any length and return a key with a fixed length. e.g: $str = 'Hello World!'; encrypt($str);//returns: "abc123"//a fixed length of characters. decrypt('abc123');//returns: "Hello World!"//the contents of the original string. above is in php Can be any computer language: Can be any fi...

Basic principles of computer encryption?

I can see how a paper-based cipher can be developed using substitutions and keys, and how those two things can become more and more complex through use of machines, thus offering some protection from decryption through brute-force approaches. But specifically I'm wondering: what other major concepts beyond substitution and key are invo...

BadPaddingException Error in RSA enryption/decryption

hello everyone, I am currently facing an error of BadPaddingException. I am sending the encrypted data from client to server. The server will do the decryption upon received data. Could anyone help me take a look at the codes and point the error, please. client side try{ Cipher c = Cipher.getInstance("RSA"); c.init(Cipher...

changing output in objective-c app

This is supposed to decrypt a hex string with an ascii string, using rc4 decryption. I'm converting my java application to objective-c. The output keeps changing, every time i run it. #import "RC4.h" @implementation RC4 @synthesize txtLyrics; @synthesize sbox; @synthesize mykey; - (IBAction) clicked: (id) sender { NSData *asciidata1 ...

How to decrypt a string in C# that was encrypted in Delphi

Hi all, we have a project written in Delphi that we want to convert to C#. Problem is that we have some passwords and settings that are encrypted and written into the registry. When we need a specified password we get it from the registry and decrypt it so we can use it. For the conversion into C# we have to do it the same way so that th...

Encrypting and decrypting strings

Does anyone know of a good way to encrypt and decrypt strings using VB6 to ensure sensitive data is secure? Also, is there an encryption method that can be shared between VB6 and .NET? Example: The encrypted string will be written to a database using a VB6 application, but the value also need to be read an decrypted in a c# .net appl...

super-space-optimized code

There are key self-contained algorithms - particularly cryptography-related such as AES, RSA, SHA1 etc - which you can find many implementations of for free on the internet. Some are written to be nice and portable clean C. Some are written to be fast - often with macros, and explicit unrolling. As far as I can tell, none are trying t...

Mac equivalent for CryptProtectData and CryptUnProtectData

I need mac (carbon) equivalent for CryptProtectData and CryptUnProtectData. Please refrain from suggesting a cocoa solution with "move to cocoa" since that's not an option. ...

"Out of Memory" Exception when Decrypting an XML file

I'm using the System.Security.Cryptography library to encrypt and decrypt xml files. Recently though I've been getting OOM (Out of Memory) exceptions while trying to decrypt a 75MB file. Here's the code I'm using: using System.Security.Cryptography.Xml; ... public static XmlDocument DecryptIntoXmlDoc(string filename) ...

What algorithm should I use for encrypting and embedding a password for an application?

What algorithm should I use for encrypting and embedding a password for an application? It obviously is not bullet proof, but it should be good enough to thwart someone scanning the database with a hex editor, or make it hard for someone who has the skills to use a debugger to trace the code to work out, either by scanning for the encry...

what is it mean and it's output?

Can any one please let me know what is it mean and it's output? it is a .Net script. private static readonly byte[] Key = { 0xda, 0x3c, 0x35, 0x6f, 0xbd, 0xd, 0x87, 0xf0, 0x9a, 0x7, 0x6d, 0xab, 0x7e, 0x82, 0x36, 0xa, ...

"Downloading" a computed value form JavaScript

I'm hoping you can prove me wrong here (please, please, please! ;). I have a situation where I need to download encrypted data from a Server D (for "Data"). Server K (for "Key") has the encryption key. For security sake, I would really prefer that Server D never know the key that Server K knows. What I want is my client (e.g. your browse...

Invalid character in a Base-64 string

Getting a few different exceptions related to Base-64 strings in C#. Below are the exceptions along with sample string. I don't know too much about this topic but I believe I did confirm the lengths of the following strings are multiples of 4. I'm hoping these issues are all related but I'm not sure. Any help is appreciated. "Invali...

How to find Key and IV value from .Net to PHP

Can any one please let me know is there any way to find a solution for the below stuffs. I need to find out the KEY and IV value from the below byte array. the byte array in .net and this has to be convert into KEY(string) and IV(string) via PHP. private static readonly byte[] Key = { 0xda...

EncryptedPackageEnvelope Document Decryption

Hi, I am trying to decrypt an MS Office 2007 document by .NET code. I know the password to open and the encryption provider (obviously), but can not find any example on how to get the Package object from the EncryptedPackageEnvelope. All MS examples are DRM related, but the documents only have a password to open. Please help! Thanks! ...