usbarmory / interlock

INTERLOCK - file encryption and HSM front-end
Other
295 stars 46 forks source link

How to decrypt a file? #47

Closed vonProteus closed 3 years ago

vonProteus commented 3 years ago

i encrypt file with aes-256-ofb and passphrase via webui when i try to decrypt it via

usbarmory@usbarmory:~/.interlock-mnt$ openssl enc -d -aes-256-ofb -in file.txt.aes256ofb -out file.txt.aes256ofb.txt
bufsize=8192
enter aes-256-ofb decryption password:
bad magic number

i tried on my local machine and result is the same decryption in webui works

interlock.conf

{
  "debug": true,
  "static_path": "static",
  "set_time": false,
  "bind_address": "0.0.0.0:4430",
  "tls": "gen",
  "tls_cert": "certs/cert.pem",
  "tls_key": "certs/key.pem",
  "tls_client_ca": "",
  "hsm": "off",
  "key_path": "keys",
  "volume_group": "usbarmory-sd",
  "ciphers": [
          "OpenPGP",
          "AES-256-OFB",
          "TOTP"
  ]
}
abarisani commented 3 years ago

The encryption performed in INTERLOCK is not meant to be compatible with openssl as it has a specific format, see here.

vonProteus commented 3 years ago

ok is not compatible with openssl so what is the rationale behind this feature? if i need INTERLOCK to decrypt file

i thought it was used like this:

abarisani commented 3 years ago

The rationale is to decrypt it in INTERLOCK itself, again we are not claiming openssl compatibility. If you require compatibility you can encrypt/decrypt with INTERLOCK OpenPGP support.