iOS

Security & Encryption

Advanced Keychain, CryptoKit, SSL Pinning, biometric auth, secure coding, ATS

20 preguntas de entrevista·
Senior
1

Which iOS mechanism should be used to securely store sensitive authentication tokens?

Respuesta

Keychain is iOS's native secure storage system, designed specifically for sensitive data. It automatically encrypts data and manages access according to defined control policies. UserDefaults should never be used for secrets as it stores data in plaintext. Keychain also offers advanced features like biometric access and secure iCloud synchronization.

2

Which Keychain attribute ensures data remains inaccessible while the device is locked?

Respuesta

kSecAttrAccessibleWhenUnlocked ensures data can only be accessed when the device is unlocked. This provides protection even if Keychain is consulted via a background process. This value is recommended by Apple for sensitive tokens. Other options like WhenUnlockedThisDeviceOnly provide additional protection by preventing iCloud synchronization.

3

Which CryptoKit class should be used for AES-256 symmetric encryption?

Respuesta

SymmetricKey in CryptoKit manages symmetric keys while AES.GCM (Galois/Counter Mode) performs authenticated encryption. GCM is preferred as it provides both confidentiality and authentication, preventing manipulation attacks. This approach is more secure than ChaCha20Poly1305 in contexts not requiring extreme performance on older devices.

4

What is the main advantage of asymmetric encryption over symmetric encryption?

5

What is the fundamental difference between hashing and encryption in security?

+17 preguntas de entrevista

Domina iOS para tu próxima entrevista

Accede a todas las preguntas, flashcards, tests técnicos, ejercicios de code review y simuladores de entrevista.

Empieza gratis