Latest 1.0.7
License MIT
Platforms ios 7.0, osx 10.8, requires ARC
Dependencies NAChloride, NACrypto, MPMessagePack, GHODictionary

Objective-C implementation for TripleSec.

TripleSec is a triple-paranoid symmetric encryption so that a failure in one or two ciphers won’t compromise the data.

See gabriel/NAChloride for more details on crypto implementations used here.


pod "TSTripleSec"
#import <TSTripleSec/TSTripleSec.h>

NSError *error = nil;
NSData *message = [@"this is a secret message" dataUsingEncoding:NSUTF8StringEncoding];
NSData *key = [@"toomanysecrets" dataUsingEncoding:NSUTF8StringEncoding];

TSTripleSec *tripleSec = [[TSTripleSec alloc] init];
NSData *encrypted = [tripleSec encrypt:message key:key error:&error];

NSData *decrypted = [tripleSec decrypt:encrypted key:key error:&error];


P3SKB is a format for storing encrypted keys.

NSData *privateKey = ...;
NSData *publicKey = ...;
P3SKB *key = [P3SKB P3SKBWithPrivateKey:privateKey password:@"toomanysecrets" publicKey:publicKey error:&error];

// Create from serialized data
P3SKB *key = [P3SKB P3SKBFromData:keyData error:&error];

Latest podspec

    "name": "TSTripleSec",
    "version": "1.0.7",
    "summary": "Objective-C library for TripleSec",
    "homepage": "",
    "license": {
        "type": "MIT"
    "authors": {
        "Gabriel Handford": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.7"
    "dependencies": {
        "NAChloride": [],
        "NACrypto": [],
        "MPMessagePack": [],
        "GHODictionary": []
    "source_files": "TSTripleSec/**/*.{c,h,m}",
    "requires_arc": true,
    "platforms": {
        "ios": "7.0",
        "osx": "10.8"

Pin It on Pinterest

Share This