xdg_secret_portal_store_default 0.1.1
xdg_secret_portal_store_default: ^0.1.1 copied to clipboard
A default cryptographic implementation of xdg_secret_portal_store that uses package:cryptography
A default cryptographic implementation of package:xdg_secret_portal_store that uses package:cryptography.
Usage #
import 'package:xdg_secret_portal_store/xdg_secret_portal_store.dart';
import 'package:xdg_secret_portal_store_default/xdg_secret_portal_store_default.dart';
final store = XdgSecretPortalStore(
// ...
crypto: SecretStoreCryptoDefault(),
);
Cryptography #
The Secret Portal specification states:
The master secret can be used for encrypting confidential data, but its format is opaque to the application. In particular, the length of the secret might not be sufficient for use with certain encryption algorithms. In that case, the application is supposed to expand it using a KDF algorithm.
The default implementation of this package:
- derives a 32-byte encryption key using HKDF-SHA-256 with
xdg_secret_portal_storeas the HKDFinfovalue. - uses XChaCha20-Poly1305 for authenticated encryption of the secret store.
The cryptographic operations are implemented using
package:cryptography.
However, this is an implementation detail and may change in the future.
Disclaimer #
Support for this library is given as best effort.
This library has not been reviewed or vetted by security professionals.