Decrypting/decompressing partial/incomplete PGP file - pgp

A client sends us text files via a third-party FTP service, which the client has encrypted and compressed with PGP.
Recently we have received incomplete or partial PGP files. Somehow, we can un-PGP these files and turn them back into TXT files, but they are incomplete; that is, they are cut off right in the middle of a row, somewhere in the file.
If a PGP file is somehow cut off in transmission, wouldn't it result in a bad file? How can a faulty or incomplete PGP file be un-PGP'ed? Wouldn't the PGP software (gpg.exe) error out and say the PGP file was invalid or something?

Related

Encrypt FIle in Node.JS without IV

I am trying to encrypt a file using crypto module in Node.js before uploading it to IPFS. I want to have the same result every time I encrypt the same file so I computed the hash of the file using crypto.createHash().
For encrypting the file, right now I'm using the crypto.createCipheriv(). I wanted to know if there are other ways to encrypt a file without the iv? I wanted to just use the hash I computed to encrypt the file to ensure that I get the same result every time.
I'm using Node.js v16.14.0

How to keep an encrypted file and read the file using nodejs

I have a set of passwords which I have saved in git repo. But I want to keep the file always encrypted. But in my automation, I should be able to decrypt and read data from that file.
Any idea how its possible ?

Is it possible to get a file without knowing file hash

I read some articles about how to protect files with encryption on the ipfs network. If i understand ipfs correctly, without knowing file hash you can not get file on ipfs network(maybe i am wrong).
My question
Is it possible to get a file without knowing file hash? If not why we need to encrypt files on the network(i assume that file hash is known by only file owner)?
If you do not encrypt the data, then whoever is in control of the IPFS node can very easily just look at the data. If you want to be reasonably sure that only the appropriate people can view a piece of data, you need to encrypt it in some way.

Unable to decrypt pgp file using command line

I tried to decrypt pgp files somes are getting correctly decrypted but others are still having problem for decryption.
Command which i am using for decryption is :
pgp -z pass_phrase D:\PGP_FILES\file1.pgp -o D:\PGP_FILES\DecryptedFile
Its output :
Pretty Good Privacy(tm) Version 6.5.1
(c) 1999 Network Associates Inc.
Uses the RSAREF(tm) Toolkit, which is copyright RSA Data Security, Inc.
Export of this software may be restricted by the U.S. government.
File is encrypted. Secret key is required to read it.
Key for user ID: User <mail_id>
1024-bit RSA key, Key ID 0xABC, created date
Key can sign.
And stops after several minutes.
After the decryption is started output file is getting created and also its size is increasing till the end phase but after completion of decryption file is getting deleted automatically.
I am not getting reason behind the problem. So can anybody please help me come out of this situation? What is the exact problem?

how to transfer encrypted files from one linux machine(client) over ftp and decrypt on other linux machine(server)

I want to write a program(java) which takes a file as input ,encrypt it(using aes128) and send that encrypted file via ftp and the receiver receives it and decrypt using a key.
I'm a beginner and any help on how can it be done?
thanks a lot.
Please refer this link for encrypting and decrypting your file,first you need to read file and pass contents to encrypt() and decrypt() methods,you can use simple socket server and client for transferring files.

Resources