1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="RSAParameters" FullName="System.Security.Cryptography.RSAParameters">
<TypeSignature Maintainer="auto" Language="C#" Value="public struct RSAParameters" />
<TypeSignature Language="ILAsm" Value=".class public sequential ansi serializable sealed beforefieldinit RSAParameters extends System.ValueType" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Security.Cryptography.RSA" /> class exposes an <see cref="M:System.Security.Cryptography.RSA.ExportParameters(System.Boolean)" /> method that enables you to retrieve the raw RSA key in the form of an <see cref="T:System.Security.Cryptography.RSAParameters" /> structure. Understanding the contents of this structure requires familiarity with how the <see cref="T:System.Security.Cryptography.RSA" /> algorithm works. The next section discusses the algorithm briefly.</para>
<format type="text/html">
<h2>RSA Algorithm</h2>
</format>
<para>To generate a key pair, you start by creating two large prime numbers named <math>p</math> and <math>q</math>. These numbers are multiplied and the result is called <math>n</math>. Because <math>p</math> and <math>q</math> are both prime numbers, the only factors of <math>n</math> are 1, <math>p</math>, <math>q</math>, and <math>n</math>. </para>
<para>If we consider only numbers that are less than <math>n</math>, the count of numbers that are relatively prime to <math>n</math>, that is, have no factors in common with <math>n</math>, equals <math>(p - 1)(q - 1)</math>.</para>
<para>Now you choose a number <math>e</math>, which is relatively prime to the value you calculated. The public key is now represented as <math>{e, n}</math>.</para>
<para>To create the private key, you must calculate <math>d</math>, which is a number such that <math>(d)(e) mod (p - 1)(q - 1) = 1</math>. In accordance with the Euclidean algorithm, the private key is now <math>{d, n}</math>.</para>
<para>Encryption of plaintext <math>m</math> to ciphertext <math>c</math> is defined as <math>c = (m ^ e) mod n</math>. Decryption would then be defined as <math>m = (c ^ d) mod n</math>.</para>
<format type="text/html">
<h2>Summary of Fields</h2>
</format>
<para>Section A.1.2 of the <see cref="http://go.microsoft.com/fwlink/?LinkId=113155">PKCS #1: RSA Cryptography Standard</see> on the RSA Laboratories Web site defines a format for RSA private keys.</para>
<para>The following table summarizes the fields of the <see cref="T:System.Security.Cryptography.RSAParameters" /> structure. The third column provides the corresponding field in section A.1.2 of <see cref="http://go.microsoft.com/fwlink/?LinkId=113155">PKCS #1: RSA Cryptography Standard</see>. </para>
<list type="table">
<listheader>
<item>
<term>
<para>
<see cref="T:System.Security.Cryptography.RSAParameters" /> field</para>
</term>
<description>
<para>Contains</para>
</description>
<description>
<para>Corresponding PKCS #1 field</para>
</description>
</item>
</listheader>
<item>
<term>
<para>
<see cref="F:System.Security.Cryptography.RSAParameters.D" />
</para>
</term>
<description>
<para>
<math>d</math>, the private exponent</para>
</description>
<description>
<para>privateExponent</para>
</description>
</item>
<item>
<term>
<para>
<see cref="F:System.Security.Cryptography.RSAParameters.DP" />
</para>
</term>
<description>
<para>
<math>d mod (p - 1)</math>
</para>
</description>
<description>
<para>exponent1</para>
</description>
</item>
<item>
<term>
<para>
<see cref="F:System.Security.Cryptography.RSAParameters.DQ" />
</para>
</term>
<description>
<para>
<math>d mod (q - 1)</math>
</para>
</description>
<description>
<para>exponent2</para>
</description>
</item>
<item>
<term>
<para>
<see cref="F:System.Security.Cryptography.RSAParameters.Exponent" />
</para>
</term>
<description>
<para>
<math>e</math>, the public exponent</para>
</description>
<description>
<para>publicExponent</para>
</description>
</item>
<item>
<term>
<para>
<see cref="F:System.Security.Cryptography.RSAParameters.InverseQ" />
</para>
</term>
<description>
<para>
<math>(InverseQ)(q) = 1 mod p</math>
</para>
</description>
<description>
<para>coefficient</para>
</description>
</item>
<item>
<term>
<para>
<see cref="F:System.Security.Cryptography.RSAParameters.Modulus" />
</para>
</term>
<description>
<para>
<math>n</math>
</para>
</description>
<description>
<para>modulus</para>
</description>
</item>
<item>
<term>
<para>
<see cref="F:System.Security.Cryptography.RSAParameters.P" />
</para>
</term>
<description>
<para>
<math>p</math>
</para>
</description>
<description>
<para>prime1</para>
</description>
</item>
<item>
<term>
<para>
<see cref="F:System.Security.Cryptography.RSAParameters.Q" />
</para>
</term>
<description>
<para>
<math>q</math>
</para>
</description>
<description>
<para>prime2</para>
</description>
</item>
</list>
<para>The security of RSA derives from the fact that, given the public key <math>{ e, n }</math>, it is computationally infeasible to calculate <math>d</math>, either directly or by factoring <math>n</math> into <math>p</math> and <math>q</math>. Therefore, any part of the key related to <math>d</math>, <math>p</math>, or <math>q</math> must be kept secret. If you call </para>
<para>
<see cref="M:System.Security.Cryptography.RSACryptoServiceProvider.ExportParameters(System.Boolean)" /> and ask for only the public key information, this is why you will receive only <see cref="F:System.Security.Cryptography.RSAParameters.Exponent" /> and <see cref="F:System.Security.Cryptography.RSAParameters.Modulus" />. The other fields are available only if you have access to the private key, and you request it.</para>
<para>
<see cref="T:System.Security.Cryptography.RSAParameters" /> is not encrypted in any way, so you must be careful when you use it with the private key information. In fact, none of the fields that contain private key information can be serialized. If you try to serialize an <see cref="T:System.Security.Cryptography.RSAParameters" /> structure with a remoting call or by using one of the serializers, you will receive only public key information. If you want to pass private key information, you will have to manually send that data. In all cases, if anyone can derive the parameters, the key that you transmit becomes useless. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the standard parameters for the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</para>
</summary>
</Docs>
<Members>
<Member MemberName="D">
<MemberSignature Language="C#" Value="public byte[] D;" />
<MemberSignature Language="ILAsm" Value=".field public unsigned int8[] D" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the D parameter for the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</para>
</summary>
</Docs>
</Member>
<Member MemberName="DP">
<MemberSignature Language="C#" Value="public byte[] DP;" />
<MemberSignature Language="ILAsm" Value=".field public unsigned int8[] DP" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the DP parameter for the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</para>
</summary>
</Docs>
</Member>
<Member MemberName="DQ">
<MemberSignature Language="C#" Value="public byte[] DQ;" />
<MemberSignature Language="ILAsm" Value=".field public unsigned int8[] DQ" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the DQ parameter for the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Exponent">
<MemberSignature Language="C#" Value="public byte[] Exponent;" />
<MemberSignature Language="ILAsm" Value=".field public unsigned int8[] Exponent" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the Exponent parameter for the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</para>
</summary>
</Docs>
</Member>
<Member MemberName="InverseQ">
<MemberSignature Language="C#" Value="public byte[] InverseQ;" />
<MemberSignature Language="ILAsm" Value=".field public unsigned int8[] InverseQ" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the InverseQ parameter for the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Modulus">
<MemberSignature Language="C#" Value="public byte[] Modulus;" />
<MemberSignature Language="ILAsm" Value=".field public unsigned int8[] Modulus" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the Modulus parameter for the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</para>
</summary>
</Docs>
</Member>
<Member MemberName="P">
<MemberSignature Language="C#" Value="public byte[] P;" />
<MemberSignature Language="ILAsm" Value=".field public unsigned int8[] P" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the P parameter for the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Q">
<MemberSignature Language="C#" Value="public byte[] Q;" />
<MemberSignature Language="ILAsm" Value=".field public unsigned int8[] Q" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the Q parameter for the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>
|