From 491392562a3322bbec01339472d1a1e3f164569e Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sun, 11 May 2025 00:28:43 -0400 Subject: [PATCH] Update documentation for gpgToRCW --- core/utilitiesMisc.go | 4 ++-- go.mod | 3 +-- wiki/breaking.md | 5 ++--- wiki/migration.md | 6 +++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/core/utilitiesMisc.go b/core/utilitiesMisc.go index 4f1cc9d..f767c20 100644 --- a/core/utilitiesMisc.go +++ b/core/utilitiesMisc.go @@ -13,8 +13,8 @@ import ( // WriteEntry writes entryData to an encrypted file at targetLocation. func WriteEntry(targetLocation string, entryData []byte) { - encryptedBytes := EncryptBytes(entryData) - err := os.WriteFile(targetLocation, encryptedBytes, 0600) + encBytes := EncryptBytes(entryData) + err := os.WriteFile(targetLocation, encBytes, 0600) if err != nil { back.PrintError("Failed to write to file: "+err.Error(), back.ErrorWrite, true) } diff --git a/go.mod b/go.mod index f3710de..1cbb166 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/fortis/go-steam-totp v0.0.0-20171114202746-18e928674727 github.com/pkg/sftp v1.13.9 github.com/pquerna/otp v1.4.1-0.20231130234153-3357de7c0481 + github.com/rwinkhart/go-boilerplate v0.0.0-20250509154735-0846290a7620 github.com/rwinkhart/rcw v0.0.0-20250508234041-b49d9f1eea42 golang.design/x/clipboard v0.7.0 // only for Android builds golang.org/x/crypto v0.38.0 @@ -23,8 +24,6 @@ require ( golang.org/x/sys v0.33.0 // indirect ) -require github.com/rwinkhart/go-boilerplate v0.0.0-20250509154735-0846290a7620 - replace golang.org/x/sys => github.com/rwinkhart/sys-freebsd-13-xucred v0.32.0 replace github.com/Microsoft/go-winio => github.com/rwinkhart/go-winio-easy-pipe-handles v0.0.0-20250407031321-96994a0e8410 diff --git a/wiki/breaking.md b/wiki/breaking.md index b9503a5..1e74569 100644 --- a/wiki/breaking.md +++ b/wiki/breaking.md @@ -1,8 +1,7 @@ ## Planned Breaking Changes -Leading up to the v1.0.0 release, breaking changes are both expected and planned. These changes are expected to require manual intervention from the end-user, and thus MUTN/libmutton should not be used prior to v1.0.0 if this is not acceptable. +Leading up to the v1.0.0 release, breaking changes are both expected and planned. These changes are expected to require manual intervention from the end-user, and thus MUTN/libmutton should not be used prior to v1.0.0 if this is not acceptable. These changes include, but may expand beyond the following: -- Migration to [RCW](https://github.com/rwinkhart/rcw) (no reliance on GnuPG) (libmutton v0.4.0) - Password aging data will be stored for each entry (to remind the user when it is time to change passwords) - - Will be included in entry names or in external file (to prevent needing to decrypt entries to access this information) \ No newline at end of file + - Will be included in entry names or in external file (to prevent needing to decrypt entries to access this information) diff --git a/wiki/migration.md b/wiki/migration.md index 1edcf9c..2b13557 100644 --- a/wiki/migration.md +++ b/wiki/migration.md @@ -4,8 +4,8 @@ #### libmutton < v0.4.0 libmutton-based password managers (prior to v0.4.0) use GnuPG encryption and an entry format similar to that of [pass](https://www.passwordstore.org/). Because of this, any entries in `pass` format can simply be dropped into `~/.local/share/libmutton`. #### libmutton >= v0.4.0 -Current libmutton-based password managers use a custom, embedded cryptography agent ([RCW](https://github.com/rwinkhart/rcw)). The layout of the entries themselves has not changed, so gpg-encrypted entries (from `pass` or older libmutton releases) can simply be decrypted and re-encrypted with RCW. A conversion script will be published prior to the release of libmutton v0.4.0. +Current libmutton-based password managers use a custom, embedded cryptography agent ([RCW](https://github.com/rwinkhart/rcw)). The layout of the entries themselves has not changed, so gpg-encrypted entries (from `pass` or older libmutton releases) can simply be decrypted and re-encrypted with RCW. A [conversion program](https://github.com/rwinkhart/sshyp-labs/releases/tag/v2.0.0) has been published for this purpose. ### sshyp -`sshyp`, though also `pass`-compatible, makes some changes to the entry format that take effect once the entry has been imported. The changes made by `sshyp` are not compatible with libmutton, and as such `sshyp` entries must be converted before they can be used. A script for exporting to libmutton (prior to v0.4.0) has been published to the `sshyp` extension store. Simply run `sshyp tweak`, go to the "extension management" menu, and download the "export-to-libmutton" extension. After doing this, the `sshyp export` command can be used to export entries in libmutton format. If migrating into libmutton v0.4.0 or later, a second conversion script will be needed to re-encrypt the exported `sshyp` entries; this script will be published prior to the release of libmutton v0.4.0. +`sshyp`, though also `pass`-compatible, makes some changes to the entry format that take effect once the entry has been imported. The changes made by `sshyp` are not compatible with libmutton, and as such `sshyp` entries must be converted before they can be used. A script for exporting to libmutton (prior to v0.4.0) has been published to the `sshyp` extension store. Simply run `sshyp tweak`, go to the "extension management" menu, and download the "export-to-libmutton" extension. After doing this, the `sshyp export` command can be used to export entries in libmutton format. If migrating into libmutton v0.4.0 or later, a second [conversion program](https://github.com/rwinkhart/sshyp-labs/releases/tag/v2.0.0) will be needed to re-encrypt the exported `sshyp` entries. ### Other -The formats for many other password managers can be converted to the `pass` format with community scripts. Some of these scripts are listed [here](https://www.passwordstore.org/#migration). Once converted, entries can be dropped into `~/.local/share/libmutton`. If migrating into libmutton v0.4.0 or later, a second conversion script will be needed to re-encrypt the converted entries; this script will be published prior to the release of libmutton v0.4.0. +The formats for many other password managers can be converted to the `pass` format with community scripts. Some of these scripts are listed [here](https://www.passwordstore.org/#migration). Once converted, entries can be dropped into `~/.local/share/libmutton`. If migrating into libmutton v0.4.0 or later, a second [conversion program](https://github.com/rwinkhart/sshyp-labs/releases/tag/v2.0.0) will be needed to re-encrypt the converted entries.