Hello,
I'm looking for recommendations on an Objective-C library for AES-256 encryption in CTR mode. I have a database full of data encrypted with another library using CTR and seems the included CCCrypt only supports ECB or CBC with PKCS#7.
Any idea on the best portable library I should use? I'm not looking to port the original implem...
I was bored and wrote a wrapper around openSSL to do AES encryption with less work. If I do it like this:
http://pastebin.com/V1eqz4jp (ivec = 0)
Everything works fine, but the default ivec is all 0's, which has some security problems. Since I'm passing the data back as a string anyway, I figured, why not generate a random ivec and stick...
Do you know any function implementation I could use for decrypting data encrypted by AES/Rijndael in SQL Server 2000?
...
cipher.h cipher.m are developing a module has.
NSData value of the encrypted value problem as follows. : <0b21kck 0v35919 sk2910>
As the purpose of encryption is to be sent to NSURLConnection String value.
NSString value to NSData encrypted so I think it must be converted to
What can you do?
...
I'm trying to adapt this DES encrypting example to AES, so I made the changes, and it try to run this:
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.spec.AlgorithmParameterSpec;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import ...
The following code is a try to encrypt data using AES with asymmetric key:
import java.io.OutputStream;
import java.math.BigInteger;
import java.security.Key;
import java.security.KeyFactory;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.RSAPrivateKeySpec;
import j...
*cipher.h, cipher.m all code : http://watchitlater.com/blog/2010/02/java-and-iphone-aes-interoperability
Cipher.m
-(NSData *)encrypt:(NSData *)plainText{
return [self transform:KCCEncrypt data:plainText;
}
step1.
Cipher *cipher = [[Cipher alloc]initWithKey:@"1234567890"];
NSData *input = [@"kevin" dataUsingEncoding:NSUTF8StringEnc...
I am trying to create an AES encryption method, but for some reason I keep getting a 'java.security.InvalidKeyException: Key length not 128/192/256 bits'.
Here is the code:
public static SecretKey getSecretKey(char[] password, byte[] salt) throws NoSuchAlgorithmException, InvalidKeySpecException{
SecretKeyFactory factory = SecretKe...
Testing RSA to encrypt an AES key, I realized that RSA has only 1 block with a limited size (settable by the programmer) do store the encrypted key.
The question is, when I use:
KeyGenerator.getInstance("AES").generateKey()
the AES keys will have a constant size in every computer and jvm implementation?
...
Hello,
I am trying to take an AES HMAC of a file using the openssl command line program on Linux. I have been looking at the man pages but can't quite figure out how successfully make a HMAC. I can encrypt a file using the enc command with openssl however I can't seem to create a HMAC. The encryption looks like the following:
opens...
Why can I encrypt only 16 characters of text?
Works:
string plainText = "1234567890123456";
Doesn't work:
string plainText = "12345678901234561";
Doesn't work:
string plainText = "123456789012345";
Code:
string plainText = "1234567890123456";
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
byte[] keyBytes = Syste...
hi,
i modified the code available on
http://java.sun.com/developer/technicalArticles/Security/AES/AES_v1.html
and made encrypt and decrypt methods in program. but i am getting BadpaddingException..
also the function is returning null..
why it is happing?? whats going wrong? please help me..
these are variables i am using:
kgen = Ke...
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 =...
Can i get link for AES-128 Bit Algorithm any sample code please help
...
I need to implement some crypto protocol on C# and want to say that this is my first project in C#. After spending some time to get used on C# I found out that I am unable to get compliant AES vectors.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.I...
In the code
javax.crypto.KeyGenerator.getInstance("AES").generateKey();
What's the size of the generated key?
...
Hi all,
I am new to Encryption/ Decryption. I want to encrypt a NSString variable value using key. Also I want to decrypt the encrypted data . I want to apply AES -128 Algorithm.
Please suggest sample code or useful link.
...
I have an AES encryption being made on two columns: one of these columns is stored at a SQL Server 2000 database; the other is stored at a SQL Server 2008 database.
As the first column's database (2000) doesn't have native functionality for encryption / decryption, we've decided to do the cryptography logic at application level, with .N...
Overview:
I'm trying to design an application that will encrypt files to safely send through Snail Mail (LARGE sets of data). I'm planning on using AES/RijndaelManaged encryption from .Net to encrypt the files initially, using a randomly generated key using RNGCryptoServiceProvider. I'm then encrypting this random AES key with a RSA Pu...
I have looked a bit into cryptography and related matters during the last couple of days and am pretty confused by now. I have a question about password strength and am hoping that someone can clear up my confusion by sharing how they think through the following questions. I am becoming obsessed about these things, but need to spend my t...