You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just to let you know, I told him to better ask the developers regarding these questions. We in the Forum don't have much of the insights. Especially when it comes to questions why certain hash functions have been chosen, the broader community is missing the information I think.
Well, I'm not sure; @tanguy-opendsi does this answer your question?
The comment seems to be descriptive: "Encrypts a value and adds an HMAC (Encrypt-Then-MAC)"
And the DB table oc_credentials seems to save a value consisting of ciphertext|iv|hmac
where "iv" seems to be a random number based on the length of an string. I don't understand what iv could mean or what ivLength is about. But maybe you understand that.
Please let us know what your questions was aiming at and where further clarification is required.
@LukasReschke
Ok :)
My question is :
How work the mechanism when you use external storage?
Nextcloud have to store and decrypt the password to use external storage properly ?
If yes, what is the strength of your code (Using salt, what algorithm ect..)
Can you describe the mechanism ?
Isn't it futile to encrypt the password, considered that if an attacker compromises the system he can easily obtain the secret?
I'd much prefer for the password not to be stored if there is no need for them, yet they are even if I have no external storage configured with stored credentials.
Activity
kesselb commentedon Oct 7, 2019
server/lib/private/Security/CredentialsManager.php
Lines 53 to 69 in c54a59d
server/lib/private/Security/Crypto.php
Lines 84 to 103 in be5c050
I would say yes.
Sure. Everything is open. Please use https://help.nextcloud.com for questions.
Schmuuu commentedon Oct 7, 2019
Hi @kesselb
Just to let you know, I told him to better ask the developers regarding these questions. We in the Forum don't have much of the insights. Especially when it comes to questions why certain hash functions have been chosen, the broader community is missing the information I think.
kesselb commentedon Oct 7, 2019
Seems valid. Do you think the answer is sufficient? We can still ping some of the paid engineers. But the question is not specific.
Schmuuu commentedon Oct 8, 2019
Thanks :)
Well, I'm not sure; @tanguy-opendsi does this answer your question?
The comment seems to be descriptive: "Encrypts a value and adds an HMAC (Encrypt-Then-MAC)"
And the DB table oc_credentials seems to save a value consisting of
ciphertext|iv|hmacwhere "iv" seems to be a random number based on the length of an string. I don't understand what iv could mean or what ivLength is about. But maybe you understand that.
Please let us know what your questions was aiming at and where further clarification is required.
tanguy-opendsi commentedon Oct 8, 2019
@Schmuuu Thx for your reply yes i'm understanding the HMAC but same like you not the iv
for the iv i did not understand too :)
kesselb commentedon Oct 8, 2019
cc @nextcloud/security 🏓
LukasReschke commentedon Oct 8, 2019
IV = Initialization Vector, which is required as this is using AES in CBC mode.
https://en.wikipedia.org/wiki/Initialization_vector has some more details.
tanguy-opendsi commentedon Oct 8, 2019
@LukasReschke that mean HMAC use AES?
LukasReschke commentedon Oct 8, 2019
The HMAC is there to provide integrity. AES CBC alone doesn’t provide that.
The answer at https://security.stackexchange.com/questions/63132/when-to-use-hmac-alongside-aes is describing this quite well.
LukasReschke commentedon Oct 8, 2019
I guess it would be good if you could rephrase your original question so that we can give a better answer :-)
What are your concerns? What do you want to protect against?
tanguy-opendsi commentedon Oct 8, 2019
@LukasReschke
Ok :)
My question is :
How work the mechanism when you use external storage?
Nextcloud have to store and decrypt the password to use external storage properly ?
If yes, what is the strength of your code (Using salt, what algorithm ect..)
Can you describe the mechanism ?
olivluca commentedon May 19, 2020
Isn't it futile to encrypt the password, considered that if an attacker compromises the system he can easily obtain the secret?
I'd much prefer for the password not to be stored if there is no need for them, yet they are even if I have no external storage configured with stored credentials.
kesselb commentedon May 19, 2020
@olivluca #21037