Tag: encryption

Password Verification – How to securely check if entered password is correct

I’m developing an app that requires multiple passwords to access varying data areas. For example, a group of people could set up a chat that requires password authentication to view. Here’s how I’m considering doing it: I have my keyword, let’s say hypothetically: Banana When the user enters their password, I use RNCryptor to encrypt […]

RNCryptor AES256 to match PHP MCRYPT_RIJNDAEL_256

The PHP API I’m calling from within my iOS app requires the payload to be encrypted in a certain customised way. I’m having troubles replicating that approach in Objective-C, with RNCryptor. Here is the PHP code used to encrypt a string: function encrypt($string) { $key = ‘some-random-key’; return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key)))); } And […]

Problem with OAuth, POST with parameters

I’m using Jon Crosby’s open source Objective-C OAuth library http://code.google.com/p/oauthconsumer/ for some basic http authentication that does not deal with tokens, only consumer key and consumer secret. My code works great for GET, GET with parameters in the URL, and POST. When I issue a POST request that has parameters in the URL, though, the […]

XOR or other simple file obfuscation method ios objective c

I am working on an ios application that uses copyrighted pdf files. I am looking for some simple ways to obfuscate the files for security that won’t require me to go through the additional Mass Market CCATS encryption review process but will also ensure the copyright holders I’ve done my bit to keep their data […]

Play encrypted video with AVPlayer

I’m implementing an application that contains video player. For some reasons video files are encrypted with AES, and size of these files can be rather big to avoid loading it to RAM as one piece. I’m looking for some way to play it with AVPlayer. Tried: 1) Custom NSURLProtocol as suggested here http://aptogo.co.uk/2010/07/protecting-resources/ Didn’t work, […]

How does one set SSL ciphers when using CFSocket/CFStream in Cocoa?

I recently needed to configure CocoaHttpServer, which we’re using in our application with success, to handle HTTPS connections coming from a client application (running on Android devices). This is fine – there is copious sample code which allows for this, and we were able to enable the secure server without issue. In practice we were […]

Decrypting data that was AES encrypted with Objective-C with Java

I try to decrypt data that was originally encrypted with Objective-C in Java. There are other questions mentioning this but they are really cluttered and many of them aren’t solved yet therefore I will post my own. This is the code that encrypts the data: – (int) encryptWithKey: (NSString *) key { // ‘key’ should […]

iPhone and Crypto Libraries

I think I’m going to have to use the Crypto libraries in my iPhone application. I wanted to ask you about the implications regarding the crypto export policy applied by Apple. Do I need to do something extra (such as filling forms etc.) 1) If I use hashing with MD5. 2) If I use symmetric […]

decrytption in ios 7 not working using aes

In My App, i’m getting data from xml, where it is encrypted, and i need to decrypt the received nsstring, UserName = @”QEjbHvzPjk+YuLDVPUJuEA==”; I Need to decrypt this nsstring into regular format, i searched and find aes , but it doesn’t make any changes, NSString* msg = [FBEncryptorAES decryptBase64String:UserName keyString:@”01234567890abcdefghijklmnopqrstuvwxyz”]; if (msg) { UserName = […]

Encryption for Objective-C

I need to send encrypted data to a remote server from Objective-C using a web service. What encryption method should I use? It should support both Objective-C and the remote server.