Re: RSA and libcrypto

2014-03-17 Thread James Moore
I might as well post my gist for building openssl and lib crypto fat binaries in case someone wants a “build it once” solution https://gist.github.com/foozmeat/5154962 It supports: Mac: i386 and x86_64 iOS: armv7, armv7s, and i386. It will add arm64 and x86_64 support for iOS 7 SDK (the defaul

Re: RSA and libcrypto

2014-01-25 Thread jonat...@mugginsoft.com
On 14 Jan 2014, at 09:42, Charles Srstka wrote: > On Jan 14, 2014, at 3:19 AM, jonat...@mugginsoft.com wrote: > >> The only problem with retaining it is the extra complexity involved in >> integrating the static library build into the project and upgrading the >> source. > > One trick that c

Re: RSA and libcrypto

2014-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2014, at 20:44, Charles Srstka wrote: > On Jan 14, 2014, at 1:09 PM, Jens Alfke wrote: > >> On Jan 14, 2014, at 9:37 AM, Jean-Daniel Dupas >> wrote: >> >>> Just in case it was not mentioned in the thread, SecTransform supports RSA. >>> You can use SecEncryptTransformCreate() with

Re: RSA and libcrypto

2014-01-14 Thread Charles Srstka
On Jan 14, 2014, at 1:09 PM, Jens Alfke wrote: > On Jan 14, 2014, at 9:37 AM, Jean-Daniel Dupas wrote: > >> Just in case it was not mentioned in the thread, SecTransform supports RSA. >> You can use SecEncryptTransformCreate() with an asymmetric key. > > Great! But there was a previous assert

Re: RSA and libcrypto

2014-01-14 Thread Jens Alfke
On Jan 14, 2014, at 9:37 AM, Jean-Daniel Dupas wrote: > Just in case it was not mentioned in the thread, SecTransform supports RSA. > You can use SecEncryptTransformCreate() with an asymmetric key. Great! But there was a previous assertion in this thread (by whom?) that the Apple docs say Sec

Re: RSA and libcrypto

2014-01-14 Thread Jean-Daniel Dupas
Le 14 janv. 2014 à 18:20, Jens Alfke a écrit : > > On Jan 14, 2014, at 1:19 AM, jonat...@mugginsoft.com wrote: > >> As Jens comments the security APIs are ridiculously opaque. >> Perhaps this is seen as a necessity in the serious world of crypto - perhaps >> it is just hard to avoid. However

Re: RSA and libcrypto

2014-01-14 Thread Jens Alfke
On Jan 14, 2014, at 1:19 AM, jonat...@mugginsoft.com wrote: > As Jens comments the security APIs are ridiculously opaque. > Perhaps this is seen as a necessity in the serious world of crypto - perhaps > it is just hard to avoid. However, it is a liability. Crypto is inevitably sort of complex,

Re: RSA and libcrypto

2014-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2014, at 09:42, Charles Srstka wrote: > On Jan 14, 2014, at 3:19 AM, jonat...@mugginsoft.com wrote: > >> The only problem with retaining it is the extra complexity involved in >> integrating the static library build into the project and upgrading the >> source. > > One trick that c

Re: RSA and libcrypto

2014-01-14 Thread Charles Srstka
On Jan 14, 2014, at 3:19 AM, jonat...@mugginsoft.com wrote: > The only problem with retaining it is the extra complexity involved in > integrating the static library build into the project and upgrading the > source. One trick that can help is that OpenSSL is in MacPorts, so you can just set up

Re: RSA and libcrypto

2014-01-14 Thread jonat...@mugginsoft.com
On 13 Jan 2014, at 22:09, Kyle Sluder wrote: > On Jan 13, 2014, at 1:57 PM, Jens Alfke wrote: >> >> >>> On Jan 13, 2014, at 1:40 PM, Kyle Sluder wrote: >>> >>> Unfortunately, SecKey{Encrypt,Decrypt} are not available on OS X. >> >> Oh crap, is this thread about OS X? I misremembered it as b

Re: RSA and libcrypto

2014-01-13 Thread Charles Srstka
On Jan 13, 2014, at 4:09 PM, Kyle Sluder wrote: > On Jan 13, 2014, at 1:57 PM, Jens Alfke wrote: > >> >> On Jan 13, 2014, at 1:40 PM, Kyle Sluder wrote: >> >>> Unfortunately, SecKey{Encrypt,Decrypt} are not available on OS X. >> >> Oh crap, is this thread about OS X? I misremembered it as b

Re: RSA and libcrypto

2014-01-13 Thread Kyle Sluder
On Jan 13, 2014, at 1:57 PM, Jens Alfke wrote: > > >> On Jan 13, 2014, at 1:40 PM, Kyle Sluder wrote: >> >> Unfortunately, SecKey{Encrypt,Decrypt} are not available on OS X. > > Oh crap, is this thread about OS X? I misremembered it as being iOS. Sorry! Who knows? Jonathan never said what pl

Re: RSA and libcrypto

2014-01-13 Thread Jens Alfke
On Jan 13, 2014, at 1:40 PM, Kyle Sluder wrote: > Unfortunately, SecKey{Encrypt,Decrypt} are not available on OS X. Oh crap, is this thread about OS X? I misremembered it as being iOS. Sorry! Yeah, Apple’s security/crypto APIs are completely f**ed up and have been for years. The old APIs wer

Re: RSA and libcrypto

2014-01-13 Thread Kyle Sluder
On Mon, Jan 13, 2014, at 01:14 PM, Jens Alfke wrote: > > On Jan 13, 2014, at 12:26 PM, Charles Srstka > wrote: > > > Really? I'll have to give this a try sometime. If this is the case, someone > > should probably file a Radar against the documentation, since it > > specifically states that the

Re: RSA and libcrypto

2014-01-13 Thread Jens Alfke
On Jan 13, 2014, at 12:26 PM, Charles Srstka wrote: > Really? I'll have to give this a try sometime. If this is the case, someone > should probably file a Radar against the documentation, since it specifically > states that the security transforms API only supports symmetric encryption > and

Re: RSA and libcrypto

2014-01-13 Thread Charles Srstka
On Jan 13, 2014, at 11:11 AM, Jens Alfke wrote: >> AFAIK, there is not. You will have to statically link lib crypto. > > No, you can use SecKeyEncrypt / SecKeyDecrypt with RSA keys. You just have to > have the keys stored in the Keychain Really? I'll have to give this a try sometime. If this i

Re: RSA and libcrypto

2014-01-13 Thread Jens Alfke
On Jan 12, 2014, at 2:11 PM, Charles Srstka wrote: > On Jan 12, 2014, at 4:00 PM, jonat...@mugginsoft.com wrote: > >> I am trying to wean my app off libcypto via security.framework and common >> crypto. >> >> My last dependency is on RSA. >> Is there an alternative non openssl api or will I h

Re: RSA and libcrypto (sorry - typos fixed)

2014-01-12 Thread Dave Fernandes
(Sigh) That’s what I get for relying on memory. I guess I’ve only ever used it for signing/verifying. Thanks for correcting. On Jan 12, 2014, at 7:26 PM, Charles Srstka wrote: > On Jan 12, 2014, at 6:16 PM, Dave Fernandes > wrote: > >> On OS X, you can use security transforms to do RSA encry

Re: RSA and libcrypto (sorry - typos fixed)

2014-01-12 Thread Charles Srstka
On Jan 12, 2014, at 6:16 PM, Dave Fernandes wrote: > On OS X, you can use security transforms to do RSA encryption/decryption and > signing/verification. Not true: https://developer.apple.com/library/mac/documentation/security/conceptual/SecTransformPG/EncryptionandDecryption/EncryptionandDecr

Re: RSA and libcrypto (sorry - typos fixed)

2014-01-12 Thread Dave Fernandes
On OS X, you can use security transforms to do RSA encryption/decryption and signing/verification. On iOS, security transforms are not available. On Jan 12, 2014, at 5:07 PM, jonat...@mugginsoft.com wrote: > > I am trying to wean my app off libcrypto via security.framework and common > crypto.

Re: RSA and libcrypto

2014-01-12 Thread Charles Srstka
On Jan 12, 2014, at 4:00 PM, jonat...@mugginsoft.com wrote: > I am trying to wean my app off libcypto via security.framework and common > crypto. > > My last dependency is on RSA. > Is there an alternative non openssl api or will I have to pursue linking a > static instance of libcypto? AFAIK,

Re: RSA and libcrypto (sorry - typos fixed)

2014-01-12 Thread jonat...@mugginsoft.com
I am trying to wean my app off libcrypto via security.framework and common crypto. My last dependency is on RSA. Is there an alternative non openssl api or will I have to pursue linking a static instance of libcrypto? Thanks Jonathan ___ Cocoa-d

RSA and libcrypto

2014-01-12 Thread jonat...@mugginsoft.com
I am trying to wean my app off libcypto via security.framework and common crypto. My last dependency is on RSA. Is there an alternative non openssl api or will I have to pursue linking a static instance of libcypto? Thanks Jonathan __