ios - 当钥匙串(keychain)被锁定时哪些钥匙串(keychain)属性是不可访问的?

标签 ios security cocoa-touch keychain

5 types of keys可以存储在 iOS 钥匙串(keychain)中

  • kSecClassGenericPassword
  • kSecClassInternet 密码
  • kSecClassCertificate
  • k安全类 key
  • kSecClassIdentity

这些键类型中的每一种都支持不同的属性集。目前还不清楚哪些属性是“公开的”并暴露给锁定的钥匙串(keychain),哪些不是。

我是否应该假设锁定的钥匙串(keychain)可以暴露以下所有内容?

没有我的应用程序组授权的应用程序可以查看我的钥匙串(keychain)项的属性吗?

enter image description here

最佳答案

所有属性都被认为是公共(public)的。钥匙串(keychain)中唯一的 secret 是数据(即你使用属性检索的东西)。参见 Keychain Services Programming Guide: Structure of a Keychain :

Note: Unlike data, an item’s attributes are not considered secret, and thus never encrypted. They can be read at any time, even when the keychain is locked.

实际上,我相信在 iOS(与 macOS 相对)中有时甚至属性(所有属性)最终都会被加密(例如在首次解锁之前),但您不应该依赖于此。如果数据是 secret ,则它应该是钥匙串(keychain)数据,而不是属性。但请记住,您不能搜索数据……因为它是加密的……您只能搜索属性。 iOS 不会一次性解密整个钥匙串(keychain)。它通常只解密它需要的部分。有关此的所有详细信息,请参阅 iOS Security Guide .

关于ios - 当钥匙串(keychain)被锁定时哪些钥匙串(keychain)属性是不可访问的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39690591/

相关文章:

php - 将用户数据保存在不同的 MySQL 表中是一个很好的安全方案吗?

asp.net-mvc - 使用 SSL 一个应用程序的多个网站

cocoa-touch - UITableViewCell 上的 textLabel.backgroundColor 不起作用

ios - 未调用委托(delegate)方法?

ios - 不是目录@rb_sysopen -/usr/local/bin/fuzzy_match

ios - 聊天应用程序中的消息数据库设计

django - 关于 Django 的 CSRF 保护问题

ios - 在 iOS 上检测传入的 NotificationCenter 通知

ios - Xcode 6 : UITapGesture is crashing with (lldb)

ios - 使用 CGAffineTransform 旋转 UIView - 如何让它走完整路径而不是短路径?