How to encrypt files

Hi,
My requirement is like...
I have encrypt and store files in the db. We know that files are stored in some binary format in the db. But then, I dont want anyone who knows how to read blobs from db to read those files without my knowledge. Please let me know what kind of encryption I can make use of?
Can I read a standard set of content from file. i.e. Read the first 1024 bytes, encrypt that and store it somewhere. Then read the next 1024 bytes, store it. And to retrieve in the same fashion as how stored earlier, and decrypt the content.
This is the crude logic that I have in mind. If anyone could suggest me any other better approach, that will be helpful for me.
Thanks in advance

I have seen several posts to these forums regarding encrypting pieces of databases, and the trouble always occurs when the poster tries to figure out key management.
Java makes encryption easy -- its just a few lines of code. The hard part is key management -- how do I generate an encryption key, arrange so that it is always available to the proper entities when needed, and that is never available to the entities that shouldn't have it.
The correct answers to these questions depends on many factors specific to your problem context, and on whether you want "real" security or merely to deter the lazy snoop.

Similar Messages

  • How to encrypt file on linux using Gnupg command in Java Embedding in BPEL.

    Hi All,
    I am trying to invoke a command script using the java embedding in BPEL Process.I am using the below code to execute the particular command to encrypt the file :-
    try {    
            Runtime rt = Runtime.getRuntime();    
    Process pr = rt.exec(new String[] {"/bin/bash", "-c", "/u01/GnuPG/bin/gpg", "-e", "-r", "Developer","/u01/oracle/ConfigFiles/Adapter_controlDir/abc.csv"});    
             int exitVal = pr.waitFor();            
            String result = "SUCCESS: Process exit with " + exitVal;         
            addAuditTrailEntry("result = "+result);      
            setVariableData("outputVariable","payload","/client:processResponse/client:result",result);    
    } catch(Exception e) {    
            e.printStackTrace();      
      String result = "FAILURE: Exception with " + e.toString();    
            addAuditTrailEntry("result = "+result);      
            setVariableData("outputVariable","payload","/client:processResponse/client:result",result);    
    The above statement does nothing. I am not sure what command i need to use to access to the command line.
    When i try this particular statement from linux machine command prompt :- /u01/GnuPG/bin/gpg -e  -r  Developer /u01/oracle/ConfigFiles/Adapter_controlDir/abc.csv
    It works absolutely fine and it creates the encrypted files also.
    Please suggest , which command i need to use from the java embedding.
    Please suggest!!
    Regards,
    Shah

    I think, you can try, writing these commands into a separate shell script and call that shell script from bpel via Java embedding. However, you might not get a return response.. but you can still give a shot.
    Hope it helps.

  • How to encrypt files in SAP ?

    Dear,
    Today, we have a Banking process that exchange files between us and the
    banks, this files cointains confidential informations of money transactions
    made by our customers. We need to encrypt the .txt files before send it
    thorough FTP server.
    I know that SAP uses Secure Store and Forward(SSF) interface that makes use
    of Public-key Cryptographic Standards(PKCS).
    But SSF is available only for "System Security for SAP Web AS ABAP Only",
    "System Security for SAP Web AS Java Only", SSL protocol and
    HTTPS protocol.
    The Bank that will receive our files uses a DELPHI program that suport the
    following Algorithm RSA (Rivest, Shamir, Adleman), DSA
    (Digital Signature Algorithm) or DH (Diffie-Hellman), Seince these are the
    most common and public algorithm I'll prefer to use them, but I 'don't know
    how to implement a abap code to make use of this encryption.
    I'll appreciate any help or information about this subject you can give.
    Alex

    Have a look at <a href="http://help.sap.com/saphelp_47x200/helpdata/en/53/251a355d0c4d78e10000009b38f83b/frameset.htm">this.</a>
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/21/f36c0e389511d5992200508b6b8b11/content.htm">This</a>is the higher level url.
    Message was edited by: Rob Burbank

  • How do you encrypt files?

    Can someone tell me how to encrypt files on my macbook? I know I have to use the disk utility but anything else confuses me.

    Kyle,
    the reason for that is quite simple, and easy to miss. When you first created the image, a password window came up, asking you to put the password in that you want to use to protect the image. right under the password, and the verify password fields, there is a check-box that says "Remember password(add to keychain)." this is checked by default. the password is still there, your coumputer just automatically fills it in. next time you create an encrypted image, deselect this field, and it will ask for authorization.
    P.S. - this remember password option is default selected the first time you mount the disk also, so make sure it's unchecked, or that will be the last time it asks you for the password
    ~cdavenport

  • Encrypt files in time capsule

    how to encrypt files that are backed up in airport time capsule?

    The option to encrypt backups will appear when you first select a disk to be used for backups.
    If you want to encrypt a disk that already has backups, you must remove the disk from backups, then click to use that disk, and the option to encyrpt will appear.

  • Can't encrypt files with fingerprint reader

    I just bought a Toshiba E105-s1602 and I cant figure out how to encrypt files and folders with the fingerprint reader.
    I use it to log onto the computer and in the instructions it says just to right click on the file and there should be something that says encrypt or something similar, but I have no options having to do with encryption.
    Does anybody know how to use this, am I doing something wrong?
    Thanks

    As far as I know this option depends on preinstalled software. I am not 100% sure but Toshiba offers two different applications for this purposes.
    If such option is not available then this option is not offered by preinstalled application.

  • Encrypting files on external hard drive

    I am wondering how to encrypt file on external hard drive. Is it best to use the disk image system?
    Also, can I make disk images flexible, so that I may keep adding files to it in the future? Ideally there are a few GBs of info I would like to store this way, but will add more later.
    Thanks for any ideas!
    Message was edited by: Mark Hilderbrandt

    Mark Hilderbrandt wrote:
    I am wondering how to encrypt file on external hard drive. Is it best to use the disk image system?
    I think so, but I haven't used anything else.
    Also, can I make disk images flexible, so that I may keep adding files to it in the future? Ideally there are a few GBs of info I would like to store this way, but will add more later.
    Use a sparse image. You can set a large size, but it will only take up the space that you store in the image. You can keep adding until you hit the max size you set or run out of disk space. There are ways to resize the disk image, also.
    Thanks for any ideas!
    Message was edited by: Mark Hilderbrandt

  • Hi Freinds......How to Encrypt/Decrypt Text file in j2me

    Hello friendz.,,
    I m having problem with textfile exncryption decryption in j2me..
    Can abybode tell me how to encrypt/decrypt Text file using J2ME API's.......
    PLZ help me .......
    Thanx in advance
    regards,
    Parag

    http://www.mobilefish.com/developer/bouncycastle/bouncycastle.html
    http://www-128.ibm.com/developerworks/library/j-midpds.html

  • How do I protect my FLV files? or How to encrypt and decrypt FLV files using AIR?

    Hi,
         I am working on an AIR application, which is developed on eLearning concept. The application mainly deals with flv files. The application contains a video player component, which will stream flv files from an Apache Server and played in my application. Here my concern is I would like to protect my flv files some how against users who may stream them from Apache Server and use them without my application.
         I thought of with an idea to do it. But I don't know whether it will work or not. So I am requesting for your suggestions and better ways to do this with a sample.
    Here is my thought:
    I would like to place the encrypted FLV files at Apache Server side [ Need to know how to encrpt the FLV files using Flex]
    As my AIR application send a request for a FLV file, the Apache server should send the decryption key and a stream of FLV file.
    AIR application should take the decryption key, stream of flv file and it should capable enough to decrypt the FLV file and play it in my application. [ But I don't know how to encrypt/decrypt FLV files through flex]
    I can do encryption of FLV files using Mac Address of Apache Server system and using Java. But I don't know how can I decrypt the same FLV file ( Encrypted using Mac Address and java ) at AIR application side.
    So I would be greatfull If any body help me in encrypting and decrypting of FLV file with a sample using Flex 3.0.
    Thanks
    Sudheer Puppala

    russellfromblackburn south wrote:
    Is it because the portable drive is NTFS format and the Mac wont recognise this? If so what do I do?
    Yes, this is exactly what is causing the problem. Macs cannot write to NTFS formatted drives, only read. You must move the documents to the internal HDD/SSD of the Mac to be able to edit them.
    Or, since you say you don't want to move the documents to the internal storage, you'll need to format the external HDD as FAT32.

  • Sum Encrypt does not recognize a copy of a file through linux. How decrypt this file with Sum Encrypt?

    Sum Encrypt does not recognize a copy of a file through linux to Mac 0S9. How decrypt this file with Sum Encrypt?

    Hello, and welcome to Apple Support Communities!
    I am not familiar with the program that you list, however files in OS 9 use things called Resource Forks (rather than file extensions) for filetype and creator.
    If you sent a file through Linux these resource forks probably got stripped and now the file is nothing to your Macintosh.
    It is best to BinHex your files (.hqx) before leaving the HFS file system so that their resource forks are preserved.
    Regards,
    Ryan

  • How can i send PGP encrypted file from PI to the receiver

    Hi experts,
                        I am unable to send the  PGP encrypted file from PI to the receiver. where the Clients sends the file using PGP encryption,
    But i am trying to send the same with PI. But i am not able to send the same can you please help me out to get the same incorporated using PI 7.1
    and sends to the receiver ( the rceiver would be FTP ).
    Regards,
    Amruth

    hi,
    You can write an adapter module to encypt your payload before sending to Reciever:
    /people/dijesh.tanna/blog/2008/09/15/sap-pi-integrating-macafee-e-business-server-with-sap-pi-70-for-pgp-encryptiondecryption
    http://www.bouncycastle.org/documentation.html
    http://www.cryptix.org/
    http://aedaptive.com/index.php/solutions/pgp-for-sap-netweaver
    http://www.pgpi.org/doc/pgpintro/
    PGP encryption: Do we need to write adapter module?
    If you are getting PGP file from sender and want  to send this file to target without any mapping transformation you can use this blog:
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    Thanks.

  • How To Encrypt /Large The Large Files(eg:40MB)...

    Hi Everybody,
    How To Encrypt/Decrypt the (Size More Than 40 MB)files using sun jce/cryptix jce ?
    I have tried upto 22 mb file.But I had OutOfMemoryException.
    How To Avoid it?
    Plz help.
    Thankz
    vengins,Chennai.India

    Hi
    Actually, this has nothing to do with memory parameters. It is an issue of programming technique. Just don't slurp in the file all at once!
    Instead copy it step by step, buffer by buffer. Read it in e.g. 64KB chunks, encrypt the 64KB and write the encrypted buffer out until the file has been completely processed. There was already a discussion on this subject. Just search for it.
    Frank

  • How to encrypt login details inside GG parameter files

    Hi anybody can tell me how to encrypt the DB login details and GG credetials inside the GG parameter files, so external users cannot read from them?
    Thanks in advance.

    GGSCI (dbstandby) 11> ENCRYPT PASSWORD TEST ENCRYPTKEY DEFAULT
    Using default key...
    Encrypted password:  AACAAAAAAAAAAAEAKASIDFQHAGGEEIRFThen on the param file :
    USERID <user>, PASSWORD AACAAAAAAAAAAAEAKASIDFQHAGGEEIRF ,ENCRYPTKEY DEFAULTYou can generate your own keys if you want and specify the key while encrypting and changing the param file.

  • Help, How to encrypt database exp  backup files?

    Hi all,
    Now, My customer want to encrypt the database backup file. We use exp command backup database, and the backup files can be restored on other servers.
    So, How to encrypt database exp backup files?
    Thanks.
    Eric David.

    Hi;
    In addition to Aman post, please mention your db and OS version,so we can help you more specificly.
    I also suggest please see below googling which mention and explain rman+encrypted backup
    http://www.google.com.tr/#hl=tr&sa=X&ei=dCAtTpuwHMjOswa1gOH3Dw&ved=0CBUQBSgA&q=RMAN%2Bencrypted+backup&spell=1&fp=503f556dbe78c402&biw=1280&bih=797
    Regard
    Helios

  • How to create encrypted File Extension??

    hi Folks
    i'd ilke to ask how to create file extension and how encrypt this extension??
    to make my question clear suppose we develop a word proceesing Application i would like this Application produce let say ".kad" when saving it and how to make this extension ".kad" encrypted meaning that we couldn't open the file unless my Application is existing.
    can anyone help me or give a tip to start of the way!!!!!!!!
    thnx

    Hi eng_kadry,
    if a little confusion is enough for you can use just a binary format, i.e. do not store readable text, but compacted binary information.
    If you really need to encrypt your data have a look at JCE (Java Crypto Extension) which provides various encryption algorithms.
    Note: You can't encrypt a file extension you encrypt the file. You can't prevent anybody opening the file with a hex-editor, but if you use binary or a really encrypted format he/she won't be able to make any sense out of it.
    Another note: Be aware that your program will always contain everything it needs to decrypt the files, so if anybody goes through the pain of decompiling your program he/she will be able to use the files and you can't prevent decompilation
    regards
    Spieler

Maybe you are looking for

  • Customer order number in CO-PA

    Hello! Does somebody know where I can see the rule for the derivation of the customer order number in CO-PA? As it is a standard characteristic I can not see the rule in transaction KEDR. Our problem is... we use the typical third-party order process

  • Mac 8.6 to OS X 10.4.4

    I'm a total mac noob so bear with me. I moved a folder from an old Mac 8.6 machine to a new OS X 10.4.4. After the move, the folder appears as unreadable to the system. What in the world have I done wrong?

  • Rolling Upgrade of Oracle 10gR2 RAC with Physical Standby (DG)

    Hi DBAs, I want to do a rolling upgrade of Oracle 10.2.0.3 (2 node RAC+ASM) with Physical Standy Dataguard to Oracle 10.2.0.4 also applying CPU (April2009). Please suggest the best way to perform this upgrade and patching with no downtime. Thanks -Sa

  • Off Topic: Business questions to business owners

    Sorry if this shouldn't be here (feel free to delete or let me know). Just thought you may be a good group to ask advice of. Looking for a new business bank account (preferably that ties into my personal accounts) and health insurance (for business).

  • Parsing Non-Blocking Data

    I'm presently using non blocking sockets to receive data from a server. The problem is that I receive several chunks of data all at once. Is there a way to parse the data using a terminating byte instead of the usual -1 EOF?