diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-08-17 08:56:43 +0200 |
---|---|---|
committer | Ralph Böhme <slow@samba.org> | 2015-08-17 17:43:36 +0200 |
commit | 05dbd3b47a728acada971b545df458ae0e082ec5 (patch) | |
tree | 05c405f9865d5f9eddc5f32c956d0e9429e35369 /libcli | |
parent | dc2d5ccd56ff8c59f3686a652ec3082069914bb4 (diff) | |
download | samba-05dbd3b47a728acada971b545df458ae0e082ec5.tar.gz |
libcli/smb: prefer AES128_CCM
Callgrind showed that we use 28,165,720,719 cpu cycles to send
a 100MB file to a client using aes-ccm.
With aes-gcm this is raises up to 723,094,413,831 cpu cycles.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11451
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 6c35430c580..c1e9e586da8 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -4598,8 +4598,12 @@ static struct tevent_req *smbXcli_negprot_smb2_subreq(struct smbXcli_negprot_sta } SSVAL(p, 0, 2); /* ChiperCount */ - SSVAL(p, 2, SMB2_ENCRYPTION_AES128_GCM); - SSVAL(p, 4, SMB2_ENCRYPTION_AES128_CCM); + /* + * For now we preferr CCM because our implementation + * is faster than GCM, see bug #11451. + */ + SSVAL(p, 2, SMB2_ENCRYPTION_AES128_CCM); + SSVAL(p, 4, SMB2_ENCRYPTION_AES128_GCM); b = data_blob_const(p, 6); status = smb2_negotiate_context_add(state, &c, |