|
This post was updated on .
Dear erman,
We are on RHEL 7.9
I am an ERP DBA and need your expertise. Requirement is to encrypt a file and push it to bank server.
Manual encryption will be done by placing the jar file & the file to be encrypted on a physical path and the same need to achieved using shell script in Linux which will be later called by a concurrent program to encrypt the file automatically instead of manual.
We have 2 options:
1) Jar file will be provided by bank and using this jar, we have to encrypt our file and push to bank. we need not generate any key from our end,as the key is included in jar file itself which will provided by bank.
Command like:
java –jar <<name of jar file>>.jar <<full path of the file>>
2) We have to generate a key using a command along with the jar file(which will be provided by bank). We have to hardcode the generated key in shell script,and use it to encrypt the file and push to bank server
Command like:
For key generation:
Java -jar <<name of jar file>>.jar E
For encryption:
java –jar <<name of jar file>>.jar <<full path of the file>> <<key>>
Which of the above is secured and need your recommendation?
Is it recommended to generate the key using jar file and hardcode the key in shell script OR asking bank to provide the key included in jar file itself?
Option 1 or Option 2
All of the banks chosen option 1.But an upcoming bank chosen option 2,the reason they said is,
Encryption key is a public key,we cannot hard code in .jar file and any change in .jar file is not possible,since same is used by multiple customer for host to host channel.
Thanks,
SG
|