2013-10-16 18:59:05

by Myklebust, Trond

[permalink] [raw]
Subject: Here's a nugget...

In gss+AF8-krb5+AF8-add+AF8-padding():

memset(p, padding, padding)+ADs-

--
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust+AEA-netapp.com
http://www.netapp.com


2013-10-16 19:10:52

by Myklebust, Trond

[permalink] [raw]
Subject: Re: Here's a nugget...

On Wed, 2013-10-16 at 15:02 -0400, J. Bruce Fields wrote:
+AD4- On Wed, Oct 16, 2013 at 06:59:04PM +-0000, Myklebust, Trond wrote:
+AD4- +AD4- In gss+AF8-krb5+AF8-add+AF8-padding():
+AD4- +AD4-
+AD4- +AD4- memset(p, padding, padding)+ADs-
+AD4-
+AD4- RFC 1964 1.2.2.3:
+AD4-
+AD4- +ACI-Data padding: Before encryption and/or signature calculation,
+AD4- plaintext data is padded to the next highest multiple of 8
+AD4- bytes, by appending between 1 and 8 bytes, the value of each
+AD4- such byte being the total number of pad bytes.+ACI-
+AD4-
+AD4- You could add a comment referencing that if you think the memset is
+AD4- confusing.

Wow... In which bar did they hold that IETF meeting?

Definitely needs a comment.

--
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust+AEA-netapp.com
http://www.netapp.com

2013-10-16 19:02:47

by J. Bruce Fields

[permalink] [raw]
Subject: Re: Here's a nugget...

On Wed, Oct 16, 2013 at 06:59:04PM +0000, Myklebust, Trond wrote:
> In gss_krb5_add_padding():
>
> memset(p, padding, padding);

RFC 1964 1.2.2.3:

"Data padding: Before encryption and/or signature calculation,
plaintext data is padded to the next highest multiple of 8
bytes, by appending between 1 and 8 bytes, the value of each
such byte being the total number of pad bytes."

You could add a comment referencing that if you think the memset is
confusing.

--b.