From: Sergey Matveev Date: Wed, 6 Jan 2016 09:05:19 +0000 (+0300) Subject: Rename chaffing package X-Git-Tag: 5.0^2~13 X-Git-Url: http://www.git.cypherpunks.ru/?p=govpn.git;a=commitdiff_plain;h=aaf6870a568560b560e1c6fcb52da2e699c14543 Rename chaffing package Signed-off-by: Sergey Matveev --- diff --git a/doc/encless.texi b/doc/encless.texi index f6d4281..a98f71f 100644 --- a/doc/encless.texi +++ b/doc/encless.texi @@ -33,5 +33,5 @@ indistinguishable from the noise, for making it more DPI-proof. It safely can be disabled, turned off or maybe its keys even can be revealed without security and forward secrecy loss. -See @code{src/govpn/chaffing} and @code{src/govpn/aont} packages for +See @code{src/govpn/cnw} and @code{src/govpn/aont} packages for details of AONT and chaffing operations. diff --git a/src/govpn/chaffing/chaffing.go b/src/govpn/cnw/cnw.go similarity index 99% rename from src/govpn/chaffing/chaffing.go rename to src/govpn/cnw/cnw.go index cee3ea4..7bef2a5 100644 --- a/src/govpn/chaffing/chaffing.go +++ b/src/govpn/cnw/cnw.go @@ -52,7 +52,7 @@ along with this program. If not, see . // ... // prefix || 0x0000000000000001 || 0x0000000000000000 // prefix || 0x0000000000000001 || 0x0100000000000000 -package chaffing +package cnw import ( "crypto/subtle" diff --git a/src/govpn/chaffing/chaffing_test.go b/src/govpn/cnw/cnw_test.go similarity index 99% rename from src/govpn/chaffing/chaffing_test.go rename to src/govpn/cnw/cnw_test.go index 7735652..24cf452 100644 --- a/src/govpn/chaffing/chaffing_test.go +++ b/src/govpn/cnw/cnw_test.go @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -package chaffing +package cnw import ( "bytes" diff --git a/src/govpn/encless.go b/src/govpn/encless.go index d29e5d3..c25c8d7 100644 --- a/src/govpn/encless.go +++ b/src/govpn/encless.go @@ -20,11 +20,11 @@ package govpn import ( "govpn/aont" - "govpn/chaffing" + "govpn/cnw" ) const ( - EncLessEnlargeSize = aont.HSize + aont.RSize*chaffing.EnlargeFactor + EncLessEnlargeSize = aont.HSize + aont.RSize*cnw.EnlargeFactor ) // Confidentiality preserving (but encryptionless) encoding. @@ -44,7 +44,7 @@ func EncLessEncode(authKey *[32]byte, nonce, in []byte) ([]byte, error) { return nil, err } out := append( - chaffing.Chaff(authKey, nonce, aonted[:aont.RSize]), + cnw.Chaff(authKey, nonce, aonted[:aont.RSize]), aonted[aont.RSize:]..., ) SliceZero(aonted[:aont.RSize]) @@ -54,14 +54,14 @@ func EncLessEncode(authKey *[32]byte, nonce, in []byte) ([]byte, error) { // Decode EncLessEncode-ed data. func EncLessDecode(authKey *[32]byte, nonce, in []byte) ([]byte, error) { var err error - winnowed, err := chaffing.Winnow( - authKey, nonce, in[:aont.RSize*chaffing.EnlargeFactor], + winnowed, err := cnw.Winnow( + authKey, nonce, in[:aont.RSize*cnw.EnlargeFactor], ) if err != nil { return nil, err } out, err := aont.Decode(append( - winnowed, in[aont.RSize*chaffing.EnlargeFactor:]..., + winnowed, in[aont.RSize*cnw.EnlargeFactor:]..., )) SliceZero(winnowed) if err != nil {