nextcloud / end_to_end_encryption_rfc

🔒 Specification for end-to-end encryption used by Nextcloud sync & mobile apps
Other
31 stars 15 forks source link

filename without path #9

Open marinofaggiana opened 6 years ago

marinofaggiana commented 6 years ago
// A JSON blob referencing all files
        "files": {
                // Following blob refers to the encrypted file "ia7OEEEyXMoRa1QWQk8r" on the filesystem
                "ia7OEEEyXMoRa1QWQk8r": {
                        // Encrypted payload to the currently used metadata key
                        // Encryption algorithm: AES/GCM/NoPadding (128 bit key size)  with metadata key from above (symmetric)
                        "encrypted": {
                                // Encryption key of the file
                                "key": "jtboLmgGR1OQf2uneqCVHpklQLlIwWL5TXAQ0keK",
                                // Unencrypted file name
                                **"filename": "/foo/test.txt",**
                                // Mimetype, if unknown use "application/octet-stream"
                                "mimetype": "plain/text",
                                // Which encryption method version was used? For updating in the future.
                                "version": 1
                        },
                        // Initialization vector 
                        "initializationVector": "+mHu52HyZq+pAAIN",
                        // Authentication tag of the file
                        "authenticationTag": "GCM authentication tag",                        
                        // Which metadata key to use
                        "metadataKey": 1

filename : only filename without the path, remove /foo/ on example ? Android insert only filename

tobiasKaminsky commented 6 years ago

Each folder has its own metadata, so metadata lists only those files in its current folder. Therefore no paths with subfolders are allowed.

if @schiessle confirms, then we need to change this is the rfc.