title: How to encrypt a big text file using AES algorithm, Hadoop and Java?
body: <p>I have a big text file (100MB or more) and I want to use AES algorithm to encrypt the content of the text file using Hadoop and Java (Map/Reduce functions), but as I am new to Hadoop, I am not really sure how to start this. I found JCE (a Java library) where AES is already implemented but I have to provide 16 bytes text along with a key to generate a 16 bytes cipher text (encrypted output). My question is how to use this JCE/AES method to get my purpose done? How should I split my big input text file and What should I pass to the map method of Mapper class? what should be the key and value? What should be passed to the Reduce method? Any kind of starting point or code example would be greatly appreciated. (P.S. I am new to Hadoop and I just ran the wordcount problem on my machine, that's it.)</p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>Actually, I have to do the following things:</p>
  
  <ol>
  <li>split the input file in 16 bytes chunks.</li>
  <li>for each chunk, I have to apply the AES algorithm to get 16 bytes cipher text and write the 16 bytes cipher text in the output file.</li>
  <li>continue the process until the input file ends.</li>
  </ol>
  
  <p>My question now is, how to parallelize it using Hadoop's Map and Reduce methods? what should be the key and how to accumulate the output cipher texts in the output file?</p>