{"record":{"id":"765984f10e8cef77","repo":"peass-ng/PEASS-ng","slug":"cipher-required-with-a-block-size-of-16","errorCode":null,"errorMessage":"cipher required with a block size of 16.","messagePattern":"cipher required with a block size of 16\\.","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/GcmBlockCipher.cs","lineNumber":55,"sourceCode":"        private int bufOff;\n        private ulong totalLength;\n        private byte[] atBlock;\n        private int atBlockPos;\n        private ulong atLength;\n        private ulong atLengthPre;\n\n        public GcmBlockCipher(\n            IBlockCipher c)\n            : this(c, null)\n        {\n        }\n\n        public GcmBlockCipher(\n            IBlockCipher c,\n            IGcmMultiplier m)\n        {\n            if (c.GetBlockSize() != BlockSize)\n                throw new ArgumentException(\"cipher required with a block size of \" + BlockSize + \".\");\n\n            if (m == null)\n            {\n                m = new Tables4kGcmMultiplier();\n            }\n\n            this.cipher = c;\n            this.multiplier = m;\n        }\n\n        public virtual string AlgorithmName\n        {\n            get { return cipher.AlgorithmName + \"/GCM\"; }\n        }\n\n        public IBlockCipher GetUnderlyingCipher()\n        {\n            return cipher;","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/peass-ng/PEASS-ng/blob/53fb989abc2219826385683a6fee826bd6cd38d6/winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/GcmBlockCipher.cs#L37-L73","documentation":"A constructor guard in GcmBlockCipher: GCM's GHASH multiplication is defined over 128-bit blocks, so the wrapped IBlockCipher must report a block size of exactly 16 bytes. It fires when the cipher passed in (e.g. a 64-bit block cipher like Blowfish or a stream cipher adapter) is incompatible with GCM.","triggerScenarios":"Thrown at winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/GcmBlockCipher.cs:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a 128-bit block cipher such as AES (AesEngine/AesFastEngine) or Camellia/Seed with GcmBlockCipher","For non-16-byte-block ciphers choose a mode that supports them (e.g. CFB/CTR) instead of GCM"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53fb989abc2219826385683a6fee826bd6cd38d6","analyzedAt":"2026-09-02T04:25:09.259Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T11:17:12.671Z"}