gmvault icon indicating copy to clipboard operation
gmvault copied to clipboard

decrypt

Open neodem opened this issue 8 years ago • 1 comments

Hello. Thanks for the blowfish encryption option.

My question is this : how can I decrypt a file individually? I'm on a mac and I've tried this:

$ gunzip 1093477997816914068.eml.crypt.gz $ openssl enc -d -bf -in 1093477997816914068.eml.crypt -out 1093477997816914068.eml -kfile keyfile {with keyfile being a copy of .info/.storage_key.sec}

but I get : 'bad magic number'

thoughts?

neodem avatar Jan 14 '17 22:01 neodem

@neodem OpenSSL will not decrypt anything encrypted by GMVault for me either. In a bind you can use the following code to one-off decrypt an email:

#!/usr/bin/env python

import unittest
import base64
import socket
import imaplib
import gzip

import gmv.blowfish
import gmv.gmvault_utils as gmvault_utils
import gmv.imap_utils as imap_utils


file_path = 'YOUR-EMAIL-TO-DECRYPT.eml.gz'
cipher = gmv.blowfish.Blowfish('YOUR-KEY-HERE')

gz_fd = gzip.open(file_path)
content = gz_fd.read()
cipher.initCTR()
decrypted = cipher.decryptCTR(content)

print decrypted

austinheap avatar May 26 '17 03:05 austinheap