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

Use same encrypted file name pattern #13

Open tobiasKaminsky opened 6 years ago

tobiasKaminsky commented 6 years ago

https://github.com/nextcloud/end_to_end_encryption/issues/45#issuecomment-364346495

For activity app we need the same file name pattern: Android: 9702f647197e42d991854361ed90e0a2 iOS: ? Desktop: P3sHabJlMdSDnHYo0kqH

@nickvergessen what do you prefer? @marinofaggiana what do you use?

This should be then in RFC (hence opening it here) and should be checked by server app.

nickvergessen commented 6 years ago

best would be something that is used as few as possible by normal users. I will then add special handling on this pattern and do more expensive stuff to find out if it really is e2e encrypted and translate it then

rullzer commented 6 years ago

Just tell me the format and I can change it.

Right now we use 20 chars. With the function of https://github.com/nextcloud/client/blob/080c5ea67817eb0b4bb80e4ba28d7cfb7e516d82/src/libsync/clientsideencryption.cpp#L68-L79

So tell me whichs chars to use and how long and I'll take care.

nickvergessen commented 6 years ago

So let's use /^[0-9a-fA-F]{32}$/ okay for everyone?

rullzer commented 6 years ago

Ok will take care :)

rullzer commented 6 years ago

Done in the client https://github.com/nextcloud/client/pull/87/commits/1eb7ba72f0ada54b92b2e1eb216b5d2d62cc30c6

marinofaggiana commented 6 years ago

I answered already :

UUIDs (Universally Unique Identifiers), also known as GUIDs (Globally Unique Identifiers) or IIDs (Interface Identifiers), are 128-bit values. UUIDs created by NSUUID conform to RFC 4122 version 4 and are created with random bytes. The standard format for UUIDs represented in ASCII is a string punctuated by hyphens, for example 68753A44-4D6F-1226-9C60-0050E4C00067.

iOS use UUID without '-' in lowercase, this RFC it's OK !

tobiasKaminsky commented 6 years ago

@rullzer do you check somewhere if this string is unique within the folder?

tcanabrava commented 6 years ago

I created the same file-name-pattern on the RFC, it's strange that no other client used the same thing. (20 random ascii filename). I would also prefer to go with marino suggestion and use UUID.

tobiasKaminsky commented 6 years ago

--> Clarified this is in RFC: https://github.com/nextcloud/end_to_end_encryption_rfc/pull/15

dantti commented 6 years ago

For the record the desktop client uses UUID https://github.com/nextcloud/client/commit/c0ef36b8fa8bb02529965184ed013d6ece459949#diff-2e2b282393fba5db71538c7faf44ef2b