Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support secret transfer via dh-ietf1024-sha256-aes128-cbc-pkcs7 #81

Open
mrueg opened this issue Aug 25, 2022 · 2 comments
Open

Support secret transfer via dh-ietf1024-sha256-aes128-cbc-pkcs7 #81

mrueg opened this issue Aug 25, 2022 · 2 comments

Comments

@mrueg
Copy link
Contributor

mrueg commented Aug 25, 2022

As of now, go-keyring only supports "plain" to transfer secrets.
It would be nice if go-keyring would support dh-ietf1024-sha256-aes128-cbc-pkcs7 as well as defined in here:
https://specifications.freedesktop.org/secret-service/latest/ch07s03.html

Further context: #66 (comment)

Kwallet recently added support for Secret Service API.

Looks like this does not work as "plain" Algorithm is not supported. Trying to use it, I get: Algorithm plain is not supported. (only dh-ietf1024-sha256-aes128-cbc-pkcs7 is supported) See: https://invent.kde.org/frameworks/kwallet/-/blob/master/src/runtime/kwalletd/kwalletfreedesktopservice.cpp#L265

Probably either kwallet should add support for plain, or maybe

err := s.object.Call(serviceInterface+".OpenSession", 0, "plain", dbus.MakeVariant("")).Store(&disregard, &sessionPath)

could be changed to use other algorithms as well.

@mikkeloscar
Copy link
Member

I tried to add a simple solution for this in #83

Can someone using kwallet try it out and report back whether this works or not?

@mrueg
Copy link
Contributor Author

mrueg commented Sep 13, 2022

Heh, #83 looked similar to my initial attempt as well. Unfortunately it did not work, as you need to prepare, handle and manage keys for DH.
Here's an implementation:
https://github.com/mvdan/bitw/blob/438196b7e8f07113742d2c5b3c2498f3f3638df8/dbus.go#L93

FWIW KDE/KWallet folks are working on supporting plain here: https://invent.kde.org/frameworks/kwallet/-/merge_requests/35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants