]> Cypherpunks.ru repositories - govpn.git/commitdiff
Rename chaffing package
authorSergey Matveev <stargrave@stargrave.org>
Wed, 6 Jan 2016 09:05:19 +0000 (12:05 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 6 Jan 2016 09:05:19 +0000 (12:05 +0300)
Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
doc/encless.texi
src/govpn/cnw/cnw.go [moved from src/govpn/chaffing/chaffing.go with 99% similarity]
src/govpn/cnw/cnw_test.go [moved from src/govpn/chaffing/chaffing_test.go with 99% similarity]
src/govpn/encless.go

index f6d42810836abd80ed7b453b2a7d0c1b357e808c..a98f71f8135c0c9a135f0999b4e898948333f89f 100644 (file)
@@ -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.
similarity index 99%
rename from src/govpn/chaffing/chaffing.go
rename to src/govpn/cnw/cnw.go
index cee3ea49cec295fc6a6114d12b4754b790ed55aa..7bef2a580845743b576dd61452a80c2f586e7b0e 100644 (file)
@@ -52,7 +52,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //     ...
 //     prefix || 0x0000000000000001 || 0x0000000000000000
 //     prefix || 0x0000000000000001 || 0x0100000000000000
-package chaffing
+package cnw
 
 import (
        "crypto/subtle"
similarity index 99%
rename from src/govpn/chaffing/chaffing_test.go
rename to src/govpn/cnw/cnw_test.go
index 773565267be7dd02275dc992c786f24ad2abdea5..24cf4524f4eb19be623bbbbbe53565704aa44452 100644 (file)
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-package chaffing
+package cnw
 
 import (
        "bytes"
index d29e5d35680d76deb47d7f7fcd28901b9f88191b..c25c8d77447fab85119b2f7298678406c73803b1 100644 (file)
@@ -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 {