Shiva Reddy
Shiva Reddy

Reputation: 456

how to send "Secure SMS" from iPhone

I am developing an iPhone application which requires the sending of an "Secure SMS", i am able ot send the sms from within our application using MFMessageComposeViewController method, but i am not getting any help on how we can send an SMS securily like the text should be encrypted from client side(iPhone) and it should be decrypted at server side and also vice versa.

any sample code or ideas would be appreciated.

thanks shiva.

Upvotes: 0

Views: 1046

Answers (3)

raid5ive
raid5ive

Reputation: 6642

As for the question, your going to have to do the encryption on your own using most likely public/private key encryption, such as RSA.

Upvotes: 0

MHC
MHC

Reputation: 6405

http://septicus.com/products/opensource/ is a valuable resource that let you use openSSL in Cocoa environment.


from main.m of SSCrypt framework

// generate a private key
NSData *privateKeyData = [SSCrypto generateRSAPrivateKeyWithLength:2048];
// generate a public key from the private key data
NSData *publicKeyData = [SSCrypto generateRSAPublicKeyFromPrivateKey:privateKeyData];

And

crypto = [[SSCrypto alloc] initWithPublicKey:publicKeyData privateKey:privateKeyData];

NSString *topSecret = @"Billy likes Mandy";
[crypto setClearTextWithString:topSecret];

NSData *encryptedTextData = [crypto encrypt];
NSData *decryptedTextData = [crypto decrypt];

NSLog(@"Top Secret: %@", topSecret);
NSLog(@"Encrypted: %@", [encryptedTextData encodeBase64]);
NSLog(@"Decrypted: %s", [decryptedTextData bytes]);

[crypto release];

Upvotes: 1

CIFilter
CIFilter

Reputation: 8677

There's absolutely no way for you to control what happens to the SMS data you send after you dismiss MFMessageComposeViewController. Once it's sent, the receiver will simply receive the SMS message, and no app can control what else happens.

Upvotes: 0

Related Questions