CFEngine private decrypt failed

Some time ago, with cfengine-3.3.5 clients I started getting this error server side:

Jan  2 10:26:33 serv cf3[7732]:  Private decrypt failed = padding check failed
Jan  2 10:29:15 serv cf3[7732]:  Private decrypt failed = block type is not 02
Jan  2 10:31:47 serv cf3[7732]:  Private decrypt failed = padding check failed 

The clients could no longer authenticate themselves against the server, and became isolated. I was not able to determine reasons of the error, which seems to happen randomly, at any time, even without policies update. Operating system, architecture, ip subnet didn’t matter in occurrence of the problem.

Read more...

Some IPsec references

Some IPsec ressources I was using while developing ipdecap

RFCs

 Requirement    Encryption Algorithm (notes)
        -----------    --------------------------
        MUST           NULL [RFC2410] (1)
        MUST           AES-CBC with 128-bit keys [RFC3602]
        MUST-          TripleDES-CBC [RFC2451]
        SHOULD         AES-CTR [RFC3686]
        SHOULD NOT     DES-CBC [RFC2405] (2)

        Requirement    Authentication Algorithm (notes)
        -----------    -----------------------------
        MUST           HMAC-SHA1-96 [RFC2404] (3)
        SHOULD+        AES-XCBC-MAC-96 [RFC3566]
        MAY            NULL (1)
        MAY            HMAC-MD5-96 [RFC2403] (4)

Authentication

Encryption

Read more...