Blowfish objective-c implementation
Asked Answered
W

2

8

What objective-c implementation of Blowfish would you advice to use? (Or may be I just missed some standard implementations available?)

Wardmote answered 5/11, 2009 at 15:3 Comment(0)
L
15

Keep in mind that Objective-C is a superset of C, and so you don't need a specific Objective-C implementation. Blowfish written in C (like at this page, the first result of googling "C blowfish implementation") will do you just fine.

Lange answered 5/11, 2009 at 15:14 Comment(3)
Exactly what I was going to say. By the time you're dealing with crypto, you're dealing with bytes, which is really below the level of Objective-C (using NSData as a wrapper notwithstanding).Electrophoresis
Thank you for your answer. Thats what I actually thought, but just needed to see someone else opinionWardmote
I note that the security framework mentioned below now supports Blowfish. Haven't tried it myself but seems like it might be a better way to go as far as power consumption goes.Weekly
F
6

Not sure if you definitely wanted to go with blowfish, but the iPhone security framework supports the following out-of-the-box:

  • kCCAlgorithmAES128 - Advanced Encryption Standard, 128-bit block
  • kCCAlgorithmDES - Data Encryption Standard
  • kCCAlgorithm3DES - Triple-DES, three key, EDE configuration
  • kCCAlgorithmCAST - CAST
  • kCCAlgorithmRC4 - RC4 stream cipher

If you do decide to implement your own you may also need an arbitrary precision integer library, libtommath will compile for the iPhone will little to no changes.

Freshman answered 5/11, 2009 at 18:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.