hanxianlong / CryptoppECC

CryptoppECC-Encryption/Decryption using ECC(Elliptic curve cryptography) for iOS and MacOSX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CryptoppECC for iOS and MacOSX

Cocoapods Compatible Platform

CryptoppECC-Encryption/Decryption using ECC(Elliptic curve cryptography).

Motivation

Cryptopp is a great free C++ class library of cryptographic schemes. But for performing such encryption one has to make a static library first from the source code files which is a headache to make for every platform. So, I here made a pod which runs a script to make that library depending upon your Xcode SDK (both iOS and MacOSX) and then installs it as a dependency in your project. I also included some Encryption/Decryption methods which took my lot of time to work properly.

Features

  1. Also supports Verify the signed message using ECDSA
  2. Compatible with Android's Bouncy Castle.

Installation with CocoaPods

Podfile

pod "CryptoppECC"

Methods

Encyption/Decryption

#import "CryptoppECC.h"
-(void)randomKeysEncryptDecrypt;

-(void)encrypt:(NSString*) public_point;

-(void)decrypt:(NSString*)private_point;

-(NSString*) decrypt:(NSString*) encryptedMessageInBase64 : (NSString*) privateKeyExponentInBase64 curve:(CurveType)curveType;

-(NSString*) encrypt:(NSString*) message : (NSString*) compressedPublicKeyPointInBase64 curve:(CurveType)curveType;

Verify Signing

#import "CryptoppECDSA.h"
-(BOOL)verifyMessage:(NSString*)message signedCertificate:(NSString*)signedCertificateInBase64  compressedServerPublicPoint:(NSString*)compressedServerPublicPointInBase64  curve:(CurveType)curveType;
-(void)exampleVerify;

Added Example file for Android's Bouncy Castle interoperability

CryptoppECC/ECC.java

Requirements

ViewPager supports minimum iOS 7 and minimum MacOSX 10.10 and uses ARC.

Contact

@sandeepCool77

Sandeep Aggarwal

License

CryptoppECC is released under the MIT license. See LICENSE for details.

About

CryptoppECC-Encryption/Decryption using ECC(Elliptic curve cryptography) for iOS and MacOSX

License:MIT License


Languages

Language:C++ 92.6%Language:Assembly 3.5%Language:Objective-C++ 1.5%Language:C 1.5%Language:Makefile 0.3%Language:Objective-C 0.2%Language:Java 0.2%Language:Shell 0.1%Language:Ruby 0.1%