iOS

Security & Encryption

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

20 면접 질문·
Senior
1

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

답변

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?

답변

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?

답변

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 면접 질문

다음 면접을 위해 iOS을 마스터하세요

모든 질문, flashcards, 기술 테스트, 코드 리뷰 연습, 면접 시뮬레이터에 접근하세요.

무료로 시작하기