1Password 4 Cloud Keychain encrypted attachment
application/octet-stream
Magic Bytes
Offset: 0
4F 50 4C 44 61 74 61 62 61 73 65 46 69 6C 65
The 1Password 4 Cloud Keychain encrypted attachment format is a proprietary data container developed by AgileBits for use within its legacy password management ecosystem. It serves as a secure mechanism for storing and synchronizing encrypted documents or media associated with individual vault items across multiple platforms. Although this architecture has been superseded, these files remain cryptographically protected and require a specific master password for decryption.
Validation Code
How to validate .attachment files in Python
Python
def is_attachment(file_path: str) -> bool:
"""Check if file is a valid ATTACHMENT by magic bytes."""
signature = bytes([0x4F, 0x50, 0x4C, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x46, 0x69, 0x6C, 0x65])
with open(file_path, "rb") as f:
return f.read(15) == signature
How to validate .attachment files in Node.js
Node.js
function isATTACHMENT(buffer: Buffer): boolean {
const signature = Buffer.from([0x4F, 0x50, 0x4C, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x46, 0x69, 0x6C, 0x65]);
return buffer.subarray(0, 15).equals(signature);
}
Go
func IsATTACHMENT(data []byte) bool {
signature := []byte{0x4F, 0x50, 0x4C, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x46, 0x69, 0x6C, 0x65}
if len(data) < 15 {
return false
}
return bytes.Equal(data[:15], signature)
}
API Endpoint
GET
/api/v1/attachment
curl https://filesignature.org/api/v1/attachment