[ 
https://issues.apache.org/jira/browse/HDFS-6606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14115547#comment-14115547
 ] 

Alejandro Abdelnur commented on HDFS-6606:
------------------------------------------

Yi, the approach LGTM. I'll ping [~atm] in case I'm missing something. 

My feedback on the patch:

*CryptoInputStream.java*:

* read(BB), the {{if (n >- 0) THEN ELSE}} section at the end, why do we need 
this now and not before? or it is a bug in CIS?

*DataTransferSaslUtils.java*:

* requestedQopContainsPrivacy(), should’t we trim() the  values in the set? 
just in case somebody added a whitespace, or this is not possible?
* sendSaslMessageAnNegotiationCipherOptions(), can payload be NULL? or that is 
an error if we get here? if the later we should throw an exception.
* createStreamPair(), we are using the same key and IV for both streams. we 
should either use 2 different KEYs or 2 different IVs, not to repeat the use of 
a KEY/IV pair. or simply exchanging 2 cipheroptions, one for IN and one for OUT.
* the use wrapping/unwrapping seems too asymmetrical how is implemented, is it 
possible to  have 2 symmetric methods used at the same level on both sides?

*hdfs.proto*:

* ChiperOption, I don’t think the fields should be optional, they are all 
required, no?

*SaslDataTransferServer.java*:

* why do we need 2 confs?, what was wrong with the original one?




> Optimize HDFS Encrypted Transport performance
> ---------------------------------------------
>
>                 Key: HDFS-6606
>                 URL: https://issues.apache.org/jira/browse/HDFS-6606
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode, hdfs-client, security
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>         Attachments: HDFS-6606.001.patch, HDFS-6606.002.patch, 
> OptimizeHdfsEncryptedTransportperformance.pdf
>
>
> In HDFS-3637, [~atm] added support for encrypting the DataTransferProtocol, 
> it was a great work.
> It utilizes SASL {{Digest-MD5}} mechanism (use Qop: auth-conf),  it supports 
> three security strength:
> * high                      3des   or rc4 (128bits)
> * medium             des or rc4(56bits)
> * low                       rc4(40bits)
> 3des and rc4 are slow, only *tens of MB/s*, 
> http://www.javamex.com/tutorials/cryptography/ciphers.shtml
> http://www.cs.wustl.edu/~jain/cse567-06/ftp/encryption_perf/
> I will give more detailed performance data in future. Absolutely it’s 
> bottleneck and will vastly affect the end to end performance. 
> AES(Advanced Encryption Standard) is recommended as a replacement of DES, 
> it’s more secure; with AES-NI support, the throughput can reach nearly 
> *2GB/s*, it won’t be the bottleneck any more, AES and CryptoCodec work is 
> supported in HADOOP-10150, HADOOP-10603 and HADOOP-10693 (We may need to add 
> a new mode support for AES). 
> This JIRA will use AES with AES-NI support as encryption algorithm for 
> DataTransferProtocol.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to