Skip to content

Commit

Permalink
Decouple vault package from cli and move it to a separate repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mislam committed Jan 3, 2023
1 parent 8acadf7 commit e3d37e4
Show file tree
Hide file tree
Showing 32 changed files with 16 additions and 1,017 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

# Fosskey CLI

Fosskey CLI (command-line interface) is the simplest way to start using an [encrypted vault][vault-repo] to store your secrets and passwords.

## What is Fosskey?

Fosskey is a [**F**]ree, [**O**]pen-source, [**S**]ecure, and [**S**]elf-custodial keychain.

## How do "they" store our passwords?
Expand Down Expand Up @@ -145,6 +149,7 @@ Fosskey does not store the master key. Instead, it uses the Argon2id key-derivat

While using the recommended parameters specified in [RFC 9106][rfc9106-params], the encryption/decryption method took about 0.8 seconds to process on a quad-core Intel processor with 16 GiB of memory. If a master key is composed of 8 characters of upper-case (A-Z), lower-case (a-z) letters and numbers (0-9), and symbols (32), there will be a total of 94 possible characters. Therefore, at least a total of B=nP(r-1) brute-force attacks is required to guess the correct master key. Here "B" is the permutation of (n, r-1). Thus, with the target hardware configuration (quad-core, 16 GiB memory), it will take about 1.3 million computation years to brute-force the 8-character long master key.

[vault-repo]: https://github.com/fosskey/vault
[chacha20-poly1305]: https://en.wikipedia.org/wiki/ChaCha20-Poly1305
[argon2]: https://en.wikipedia.org/wiki/Argon2
[rfc9106-params]: https://www.rfc-editor.org/rfc/rfc9106.html#name-parameter-choice
2 changes: 1 addition & 1 deletion cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/fosskey/cli/internal/util"
"github.com/fosskey/cli/internal/vault"
"github.com/fosskey/vault"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/fosskey/cli/internal/util"
"github.com/fosskey/cli/internal/vault"
"github.com/fosskey/vault"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/fosskey/cli/internal/util"
"github.com/fosskey/cli/internal/vault"
"github.com/fosskey/vault"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/fosskey/cli/internal/util"
"github.com/fosskey/cli/internal/vault"
"github.com/fosskey/vault"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/rekey.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/fosskey/cli/internal/util"
"github.com/fosskey/cli/internal/vault"
"github.com/fosskey/vault"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
var rootCmd = &cobra.Command{
Use: "foss",
Short: "A free, open-source, secure, and self-custodial keychain",
Version: "0.0.0",
Version: "0.1.0",
CompletionOptions: cobra.CompletionOptions{
DisableDefaultCmd: false,
HiddenDefaultCmd: true,
Expand Down
2 changes: 1 addition & 1 deletion cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/fosskey/cli/internal/util"
"github.com/fosskey/cli/internal/vault"
"github.com/fosskey/vault"
"github.com/spf13/cobra"
)

Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ module github.com/fosskey/cli
go 1.19

require (
github.com/fosskey/vault v0.1.0
github.com/spf13/cobra v1.6.1
golang.org/x/crypto v0.4.0
golang.org/x/term v0.3.0
)

require (
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/fosskey/vault v0.1.0 h1:Ii7S0SfsesL2wt2QSn9dJn/OXR0mqNL4ABusQ6OHvLg=
github.com/fosskey/vault v0.1.0/go.mod h1:RVYylQ3n2b9U/yzOkAMMhKPJthRfLLzRxdtK6ySKAWM=
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
Expand Down
104 changes: 0 additions & 104 deletions internal/cipher/cipher.go

This file was deleted.

29 changes: 0 additions & 29 deletions internal/cipher/cipher_test.go

This file was deleted.

24 changes: 0 additions & 24 deletions internal/vault/delete.go

This file was deleted.

95 changes: 0 additions & 95 deletions internal/vault/delete_test.go

This file was deleted.

20 changes: 0 additions & 20 deletions internal/vault/fetch.go

This file was deleted.

Loading

0 comments on commit e3d37e4

Please sign in to comment.