NSSecureCoding
E820428
NSSecureCoding is an Apple protocol that extends NSCoding to require secure, type-checked archiving and unarchiving of objects to prevent object substitution attacks.
Statements (45)
| Predicate | Object |
|---|---|
| instanceOf |
Apple protocol
ⓘ
Objective-C protocol ⓘ Swift protocol ⓘ |
| category |
security-related API
ⓘ
serialization protocol ⓘ |
| conformancePattern | classes adopt protocol to be securely archived ⓘ |
| definedIn | Foundation framework NERFINISHED ⓘ |
| designGoal |
backward compatibility with NSCoding
ⓘ
opt-in secure coding behavior ⓘ |
| documentationURL | https://developer.apple.com/documentation/foundation/nssecurecoding ⓘ |
| extends | NSCoding ⓘ |
| feature |
class whitelist during unarchiving
ⓘ
prevents decoding of unexpected classes ⓘ type-checked decoding ⓘ |
| introducedTo | improve NSCoding security model ⓘ |
| language |
Objective-C
NERFINISHED
ⓘ
Swift NERFINISHED ⓘ |
| platform |
Apple platforms
NERFINISHED
ⓘ
iOS ⓘ macOS ⓘ tvOS NERFINISHED ⓘ watchOS NERFINISHED ⓘ |
| purpose |
prevention of object substitution attacks
ⓘ
secure archiving of objects ⓘ secure unarchiving of objects ⓘ |
| relatedTo |
NSCoder
NERFINISHED
ⓘ
NSKeyedArchiver NERFINISHED ⓘ NSKeyedUnarchiver NERFINISHED ⓘ |
| requires |
encodeWithCoder:
ⓘ
implementation of NSCoding methods ⓘ initWithCoder: ⓘ |
| requiresForFullSecurity | requiresSecureCoding set to YES on coder ⓘ |
| requiresMethod | supportsSecureCoding ⓘ |
| requiresProperty | +supportsSecureCoding ⓘ |
| requiresPropertySemantics | class property ⓘ |
| requiresPropertyType | BOOL ⓘ |
| securityProperty |
mitigates object substitution vulnerabilities
ⓘ
reduces risk of deserialization attacks ⓘ |
| usedFor |
persisting objects to disk securely
ⓘ
secure XPC communication payloads ⓘ sending objects over IPC securely ⓘ |
| usedWith |
NSKeyedArchiver requiresSecureCoding
ⓘ
NSKeyedUnarchiver requiresSecureCoding ⓘ |
| validationMechanism |
NSCoder decodeObjectOfClass:forKey:
ⓘ
NSCoder decodeObjectOfClasses:forKey: ⓘ |
Referenced by (5)
Full triples — surface form annotated when it differs from this entity's canonical label.