From 413cb2524a0a3810aa8368d6566f9d9c12bd98fc Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Thu, 24 Mar 2022 12:29:19 -0700 Subject: [PATCH] Added more comments to example 2_encoders in dotnet (issue 465). --- dotnet/examples/2_Encoders.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dotnet/examples/2_Encoders.cs b/dotnet/examples/2_Encoders.cs index f3e3bf24c..ebe3bf270 100644 --- a/dotnet/examples/2_Encoders.cs +++ b/dotnet/examples/2_Encoders.cs @@ -35,7 +35,7 @@ private static void ExampleBatchEncoder() Utilities.PrintExampleBanner("Example: Encoders / Batch Encoder"); /* - [BatchEncoder] (For BFV scheme only) + [BatchEncoder] (For BFV or BGV scheme) Let N denote the PolyModulusDegree and T denote the PlainModulus. Batching allows the BFV plaintext polynomials to be viewed as 2-by-(N/2) matrices, with @@ -45,6 +45,11 @@ Let N denote the PolyModulusDegree and T denote the PlainModulus. Batching but the simplest computations, batching should be the preferred method to use with BFV, and when used properly will result in implementations outperforming anything done without batching. + + In a later example, we will demonstrate how to use the BGV scheme. Batching + works similarly for the BGV scheme to this example for the BFV scheme. For + example, simply changing `scheme_type::bfv` into `scheme_type::bgv` can make + this example work for the BGV scheme. */ using EncryptionParameters parms = new EncryptionParameters(SchemeType.BFV); ulong polyModulusDegree = 8192;