< Summary

Information
Class: Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupOperations
Assembly: Renci.SshNet
File(s): File 1: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_add.cs
File 2: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_double_scalarmult.cs
File 3: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_frombytes.cs
File 4: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_madd.cs
File 5: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_msub.cs
File 6: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p1p1_to_p2.cs
File 7: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p1p1_to_p3.cs
File 8: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p2_0.cs
File 9: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p2_dbl.cs
File 10: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_0.cs
File 11: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_dbl.cs
File 12: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_to_cached.cs
File 13: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_to_p2.cs
File 14: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_tobytes.cs
File 15: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_precomp_0.cs
File 16: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_scalarmult_base.cs
File 17: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_sub.cs
File 18: \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_tobytes.cs
Line coverage
98%
Covered lines: 292
Uncovered lines: 4
Coverable lines: 296
Total lines: 982
Line coverage: 98.6%
Branch coverage
96%
Covered branches: 48
Total branches: 50
Branch coverage: 96%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_add.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = p + q
 9    */
 10
 11    internal static void ge_add(out GroupElementP1P1 r, ref GroupElementP3 p, ref GroupElementCached q)
 8812    {
 13      FieldElement t0;
 14
 15      /* qhasm: enter GroupElementadd */
 16
 17      /* qhasm: fe X1 */
 18
 19      /* qhasm: fe Y1 */
 20
 21      /* qhasm: fe Z1 */
 22
 23      /* qhasm: fe Z2 */
 24
 25      /* qhasm: fe T1 */
 26
 27      /* qhasm: fe ZZ */
 28
 29      /* qhasm: fe YpX2 */
 30
 31      /* qhasm: fe YmX2 */
 32
 33      /* qhasm: fe T2d2 */
 34
 35      /* qhasm: fe X3 */
 36
 37      /* qhasm: fe Y3 */
 38
 39      /* qhasm: fe Z3 */
 40
 41      /* qhasm: fe T3 */
 42
 43      /* qhasm: fe YpX1 */
 44
 45      /* qhasm: fe YmX1 */
 46
 47      /* qhasm: fe A */
 48
 49      /* qhasm: fe B */
 50
 51      /* qhasm: fe C */
 52
 53      /* qhasm: fe D */
 54
 55      /* qhasm: YpX1 = Y1+X1 */
 56      /* asm 1: fe_add(>YpX1=fe#1,<Y1=fe#12,<X1=fe#11); */
 57      /* asm 2: fe_add(>YpX1=r.X,<Y1=p.Y,<X1=p.X); */
 8858      FieldOperations.fe_add(out r.X, ref p.Y, ref p.X);
 59
 60      /* qhasm: YmX1 = Y1-X1 */
 61      /* asm 1: fe_sub(>YmX1=fe#2,<Y1=fe#12,<X1=fe#11); */
 62      /* asm 2: fe_sub(>YmX1=r.Y,<Y1=p.Y,<X1=p.X); */
 8863      FieldOperations.fe_sub(out r.Y, ref p.Y, ref p.X);
 64
 65      /* qhasm: A = YpX1*YpX2 */
 66      /* asm 1: fe_mul(>A=fe#3,<YpX1=fe#1,<YpX2=fe#15); */
 67      /* asm 2: fe_mul(>A=r.Z,<YpX1=r.X,<YpX2=q.YplusX); */
 8868      FieldOperations.fe_mul(out r.Z, ref r.X, ref q.YplusX);
 69
 70      /* qhasm: B = YmX1*YmX2 */
 71      /* asm 1: fe_mul(>B=fe#2,<YmX1=fe#2,<YmX2=fe#16); */
 72      /* asm 2: fe_mul(>B=r.Y,<YmX1=r.Y,<YmX2=q.YminusX); */
 8873      FieldOperations.fe_mul(out r.Y, ref r.Y, ref q.YminusX);
 74
 75      /* qhasm: C = T2d2*T1 */
 76      /* asm 1: fe_mul(>C=fe#4,<T2d2=fe#18,<T1=fe#14); */
 77      /* asm 2: fe_mul(>C=r.T,<T2d2=q.T2d,<T1=p.T); */
 8878      FieldOperations.fe_mul(out r.T, ref q.T2d, ref p.T);
 79
 80      /* qhasm: ZZ = Z1*Z2 */
 81      /* asm 1: fe_mul(>ZZ=fe#1,<Z1=fe#13,<Z2=fe#17); */
 82      /* asm 2: fe_mul(>ZZ=r.X,<Z1=p.Z,<Z2=q.Z); */
 8883      FieldOperations.fe_mul(out r.X, ref p.Z, ref q.Z);
 84
 85      /* qhasm: D = 2*ZZ */
 86      /* asm 1: fe_add(>D=fe#5,<ZZ=fe#1,<ZZ=fe#1); */
 87      /* asm 2: fe_add(>D=t0,<ZZ=r.X,<ZZ=r.X); */
 8888      FieldOperations.fe_add(out t0, ref r.X, ref r.X);
 89
 90      /* qhasm: X3 = A-B */
 91      /* asm 1: fe_sub(>X3=fe#1,<A=fe#3,<B=fe#2); */
 92      /* asm 2: fe_sub(>X3=r.X,<A=r.Z,<B=r.Y); */
 8893      FieldOperations.fe_sub(out r.X, ref r.Z, ref r.Y);
 94
 95      /* qhasm: Y3 = A+B */
 96      /* asm 1: fe_add(>Y3=fe#2,<A=fe#3,<B=fe#2); */
 97      /* asm 2: fe_add(>Y3=r.Y,<A=r.Z,<B=r.Y); */
 8898      FieldOperations.fe_add(out r.Y, ref r.Z, ref r.Y);
 99
 100      /* qhasm: Z3 = D+C */
 101      /* asm 1: fe_add(>Z3=fe#3,<D=fe#5,<C=fe#4); */
 102      /* asm 2: fe_add(>Z3=r.Z,<D=t0,<C=r.T); */
 88103      FieldOperations.fe_add(out r.Z, ref t0, ref r.T);
 104
 105      /* qhasm: T3 = D-C */
 106      /* asm 1: fe_sub(>T3=fe#4,<D=fe#5,<C=fe#4); */
 107      /* asm 2: fe_sub(>T3=r.T,<D=t0,<C=r.T); */
 88108      FieldOperations.fe_sub(out r.T, ref t0, ref r.T);
 109
 110      /* qhasm: return */
 88111    }
 112  }
 113}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_double_scalarmult.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    private static void slide(sbyte[] r, byte[] a)
 68    {
 9      int i;
 10      int b;
 11      int k;
 12
 308413      for (i = 0; i < 256; ++i)
 153614        r[i] = (sbyte)(1 & (a[i >> 3] >> (i & 7)));
 15
 308416      for (i = 0; i < 256; ++i)
 153617        if (r[i] != 0)
 25118        {
 291219          for (b = 1; b <= 6 && i + b < 256; ++b)
 138820          {
 138821            if (r[i + b] != 0)
 67722            {
 67723              if (r[i] + (r[i + b] << b) <= 15)
 37124              {
 74225                r[i] += (sbyte)(r[i + b] << b); r[i + b] = 0;
 37126              }
 30627              else if (r[i] - (r[i + b] << b) >= -15)
 12328              {
 12329                r[i] -= (sbyte)(r[i + b] << b);
 71030                for (k = i + b; k < 256; ++k)
 35531                {
 35532                  if (r[k] == 0)
 12333                  {
 12334                    r[k] = 1;
 12335                    break;
 36                  }
 23237                  r[k] = 0;
 23238                }
 12339              }
 40              else
 18341                break;
 49442            }
 120543          }
 25144        }
 45
 646    }
 47
 48    /*
 49    r = a * A + b * B
 50    where a = a[0]+256*a[1]+...+256^31 a[31].
 51    and b = b[0]+256*b[1]+...+256^31 b[31].
 52    B is the Ed25519 base point (x,4/5) with x positive.
 53    */
 54
 55    internal static void ge_double_scalarmult_vartime(out GroupElementP2 r, byte[] a, ref GroupElementP3 A, byte[] b)
 356    {
 357      GroupElementPreComp[] Bi = LookupTables.Base2;
 58            // todo: Perhaps remove these allocations?
 359      sbyte[] aslide = new sbyte[256];
 360      sbyte[] bslide = new sbyte[256];
 361      GroupElementCached[] Ai = new GroupElementCached[8]; /* A,3A,5A,7A,9A,11A,13A,15A */
 62      GroupElementP1P1 t;
 63      GroupElementP3 u;
 64      GroupElementP3 A2;
 65      int i;
 66
 367      slide(aslide, a);
 368      slide(bslide, b);
 69
 370      ge_p3_to_cached(out Ai[0], ref A);
 671      ge_p3_dbl(out t, ref A); ge_p1p1_to_p3(out A2, ref t);
 972      ge_add(out t, ref A2, ref Ai[0]); ge_p1p1_to_p3(out u, ref t); ge_p3_to_cached(out Ai[1], ref u);
 973      ge_add(out t, ref A2, ref Ai[1]); ge_p1p1_to_p3(out u, ref t); ge_p3_to_cached(out Ai[2], ref u);
 974      ge_add(out t, ref A2, ref Ai[2]); ge_p1p1_to_p3(out u, ref t); ge_p3_to_cached(out Ai[3], ref u);
 975      ge_add(out t, ref A2, ref Ai[3]); ge_p1p1_to_p3(out u, ref t); ge_p3_to_cached(out Ai[4], ref u);
 976      ge_add(out t, ref A2, ref Ai[4]); ge_p1p1_to_p3(out u, ref t); ge_p3_to_cached(out Ai[5], ref u);
 977      ge_add(out t, ref A2, ref Ai[5]); ge_p1p1_to_p3(out u, ref t); ge_p3_to_cached(out Ai[6], ref u);
 978      ge_add(out t, ref A2, ref Ai[6]); ge_p1p1_to_p3(out u, ref t); ge_p3_to_cached(out Ai[7], ref u);
 79
 380      ge_p2_0(out r);
 81
 3482      for (i = 255; i >= 0; --i)
 1783      {
 2084        if ((aslide[i] != 0) || (bslide[i] != 0)) break;
 1485      }
 86
 151187      for (; i >= 0; --i)
 75488      {
 75489        ge_p2_dbl(out t, ref r);
 90
 75491        if (aslide[i] > 0)
 6792        {
 6793          ge_p1p1_to_p3(out u, ref t);
 6794          ge_add(out t, ref u, ref Ai[aslide[i] / 2]);
 6795        }
 68796        else if (aslide[i] < 0)
 5997        {
 5998          ge_p1p1_to_p3(out u, ref t);
 5999          ge_sub(out t, ref u, ref Ai[(-aslide[i]) / 2]);
 59100        }
 101
 754102        if (bslide[i] > 0)
 61103        {
 61104          ge_p1p1_to_p3(out u, ref t);
 61105          ge_madd(out t, ref u, ref Bi[bslide[i] / 2]);
 61106        }
 693107        else if (bslide[i] < 0)
 64108        {
 64109          ge_p1p1_to_p3(out u, ref t);
 64110          ge_msub(out t, ref u, ref Bi[(-bslide[i]) / 2]);
 64111        }
 112
 754113        ge_p1p1_to_p2(out r, ref t);
 754114      }
 3115    }
 116
 117  }
 118}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_frombytes.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    internal static int ge_frombytes_negate_vartime(out GroupElementP3 h, byte[] data, int offset)
 38    {
 9      FieldElement u;
 10      FieldElement v;
 11      FieldElement v3;
 12      FieldElement vxx;
 13      FieldElement check;
 14
 315      FieldOperations.fe_frombytes(out h.Y, data, offset);
 316      FieldOperations.fe_1(out h.Z);
 317      FieldOperations.fe_sq(out u, ref  h.Y);
 318      FieldOperations.fe_mul(out v, ref  u, ref  LookupTables.d);
 319      FieldOperations.fe_sub(out u, ref  u, ref  h.Z);       /* u = y^2-1 */
 320      FieldOperations.fe_add(out v, ref  v, ref  h.Z);       /* v = dy^2+1 */
 21
 322      FieldOperations.fe_sq(out v3, ref  v);
 323      FieldOperations.fe_mul(out v3, ref  v3, ref  v);        /* v3 = v^3 */
 324      FieldOperations.fe_sq(out h.X, ref  v3);
 325      FieldOperations.fe_mul(out h.X, ref  h.X, ref  v);
 326      FieldOperations.fe_mul(out h.X, ref  h.X, ref  u);    /* x = uv^7 */
 27
 328      FieldOperations.fe_pow22523(out h.X, ref  h.X); /* x = (uv^7)^((q-5)/8) */
 329      FieldOperations.fe_mul(out h.X, ref  h.X, ref  v3);
 330      FieldOperations.fe_mul(out h.X, ref  h.X, ref  u);    /* x = uv^3(uv^7)^((q-5)/8) */
 31
 332      FieldOperations.fe_sq(out vxx, ref  h.X);
 333      FieldOperations.fe_mul(out vxx, ref  vxx, ref  v);
 334      FieldOperations.fe_sub(out check, ref  vxx, ref  u);    /* vx^2-u */
 335      if (FieldOperations.fe_isnonzero(ref check) != 0)
 336      {
 337        FieldOperations.fe_add(out check, ref  vxx, ref  u);  /* vx^2+u */
 338        if (FieldOperations.fe_isnonzero(ref check) != 0)
 039        {
 040          h = default(GroupElementP3);
 041          return -1;
 42        }
 343        FieldOperations.fe_mul(out h.X, ref  h.X, ref  LookupTables.sqrtm1);
 344      }
 45
 346      if (FieldOperations.fe_isnegative(ref h.X) == (data[offset + 31] >> 7))
 047        FieldOperations.fe_neg(out h.X, ref h.X);
 48
 349      FieldOperations.fe_mul(out h.T, ref h.X, ref h.Y);
 350      return 0;
 351    }
 52
 53  }
 54}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_madd.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = p + q
 9    */
 10    internal static void ge_madd(out GroupElementP1P1 r, ref  GroupElementP3 p, ref GroupElementPreComp q)
 57311    {
 12      FieldElement t0;
 13
 14      /* qhasm: enter ge_madd */
 15
 16      /* qhasm: fe X1 */
 17
 18      /* qhasm: fe Y1 */
 19
 20      /* qhasm: fe Z1 */
 21
 22      /* qhasm: fe T1 */
 23
 24      /* qhasm: fe ypx2 */
 25
 26      /* qhasm: fe ymx2 */
 27
 28      /* qhasm: fe xy2d2 */
 29
 30      /* qhasm: fe X3 */
 31
 32      /* qhasm: fe Y3 */
 33
 34      /* qhasm: fe Z3 */
 35
 36      /* qhasm: fe T3 */
 37
 38      /* qhasm: fe YpX1 */
 39
 40      /* qhasm: fe YmX1 */
 41
 42      /* qhasm: fe A */
 43
 44      /* qhasm: fe B */
 45
 46      /* qhasm: fe C */
 47
 48      /* qhasm: fe D */
 49
 50      /* qhasm: YpX1 = Y1+X1 */
 51      /* asm 1: fe_add(>YpX1=fe#1,<Y1=fe#12,<X1=fe#11); */
 52      /* asm 2: fe_add(>YpX1=r.X,<Y1=p.Y,<X1=p.X); */
 57353      FieldOperations.fe_add(out r.X, ref p.Y, ref p.X);
 54
 55      /* qhasm: YmX1 = Y1-X1 */
 56      /* asm 1: fe_sub(>YmX1=fe#2,<Y1=fe#12,<X1=fe#11); */
 57      /* asm 2: fe_sub(>YmX1=r.Y,<Y1=p.Y,<X1=p.X); */
 57358      FieldOperations.fe_sub(out r.Y, ref p.Y, ref p.X);
 59
 60      /* qhasm: A = YpX1*ypx2 */
 61      /* asm 1: fe_mul(>A=fe#3,<YpX1=fe#1,<ypx2=fe#15); */
 62      /* asm 2: fe_mul(>A=r.Z,<YpX1=r.X,<ypx2=q.yplusx); */
 57363      FieldOperations.fe_mul(out r.Z, ref r.X, ref q.yplusx);
 64
 65      /* qhasm: B = YmX1*ymx2 */
 66      /* asm 1: fe_mul(>B=fe#2,<YmX1=fe#2,<ymx2=fe#16); */
 67      /* asm 2: fe_mul(>B=r.Y,<YmX1=r.Y,<ymx2=q.yminusx); */
 57368      FieldOperations.fe_mul(out r.Y, ref r.Y, ref q.yminusx);
 69
 70      /* qhasm: C = xy2d2*T1 */
 71      /* asm 1: fe_mul(>C=fe#4,<xy2d2=fe#17,<T1=fe#14); */
 72      /* asm 2: fe_mul(>C=r.T,<xy2d2=q.xy2d,<T1=p.T); */
 57373      FieldOperations.fe_mul(out r.T, ref q.xy2d, ref p.T);
 74
 75      /* qhasm: D = 2*Z1 */
 76      /* asm 1: fe_add(>D=fe#5,<Z1=fe#13,<Z1=fe#13); */
 77      /* asm 2: fe_add(>D=t0,<Z1=p.Z,<Z1=p.Z); */
 57378      FieldOperations.fe_add(out t0, ref p.Z, ref p.Z);
 79
 80      /* qhasm: X3 = A-B */
 81      /* asm 1: fe_sub(>X3=fe#1,<A=fe#3,<B=fe#2); */
 82      /* asm 2: fe_sub(>X3=r.X,<A=r.Z,<B=r.Y); */
 57383      FieldOperations.fe_sub(out r.X, ref r.Z, ref r.Y);
 84
 85      /* qhasm: Y3 = A+B */
 86      /* asm 1: fe_add(>Y3=fe#2,<A=fe#3,<B=fe#2); */
 87      /* asm 2: fe_add(>Y3=r.Y,<A=r.Z,<B=r.Y); */
 57388      FieldOperations.fe_add(out r.Y, ref r.Z, ref r.Y);
 89
 90      /* qhasm: Z3 = D+C */
 91      /* asm 1: fe_add(>Z3=fe#3,<D=fe#5,<C=fe#4); */
 92      /* asm 2: fe_add(>Z3=r.Z,<D=t0,<C=r.T); */
 57393      FieldOperations.fe_add(out r.Z, ref t0, ref r.T);
 94
 95      /* qhasm: T3 = D-C */
 96      /* asm 1: fe_sub(>T3=fe#4,<D=fe#5,<C=fe#4); */
 97      /* asm 2: fe_sub(>T3=r.T,<D=t0,<C=r.T); */
 57398      FieldOperations.fe_sub(out r.T, ref t0, ref r.T);
 99
 100      /* qhasm: return */
 101
 573102    }
 103
 104  }
 105}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_msub.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = p - q
 9    */
 10    internal static void ge_msub(out GroupElementP1P1 r, ref  GroupElementP3 p, ref  GroupElementPreComp q)
 6411    {
 12      FieldElement t0;
 13
 14      /* qhasm: enter ge_msub */
 15
 16      /* qhasm: fe X1 */
 17
 18      /* qhasm: fe Y1 */
 19
 20      /* qhasm: fe Z1 */
 21
 22      /* qhasm: fe T1 */
 23
 24      /* qhasm: fe ypx2 */
 25
 26      /* qhasm: fe ymx2 */
 27
 28      /* qhasm: fe xy2d2 */
 29
 30      /* qhasm: fe X3 */
 31
 32      /* qhasm: fe Y3 */
 33
 34      /* qhasm: fe Z3 */
 35
 36      /* qhasm: fe T3 */
 37
 38      /* qhasm: fe YpX1 */
 39
 40      /* qhasm: fe YmX1 */
 41
 42      /* qhasm: fe A */
 43
 44      /* qhasm: fe B */
 45
 46      /* qhasm: fe C */
 47
 48      /* qhasm: fe D */
 49
 50      /* qhasm: YpX1 = Y1+X1 */
 51      /* asm 1: fe_add(>YpX1=fe#1,<Y1=fe#12,<X1=fe#11); */
 52      /* asm 2: fe_add(>YpX1=r.X,<Y1=p.Y,<X1=p.X); */
 6453      FieldOperations.fe_add(out r.X, ref p.Y, ref p.X);
 54
 55      /* qhasm: YmX1 = Y1-X1 */
 56      /* asm 1: fe_sub(>YmX1=fe#2,<Y1=fe#12,<X1=fe#11); */
 57      /* asm 2: fe_sub(>YmX1=r.Y,<Y1=p.Y,<X1=p.X); */
 6458      FieldOperations.fe_sub(out r.Y, ref p.Y, ref p.X);
 59
 60      /* qhasm: A = YpX1*ymx2 */
 61      /* asm 1: fe_mul(>A=fe#3,<YpX1=fe#1,<ymx2=fe#16); */
 62      /* asm 2: fe_mul(>A=r.Z,<YpX1=r.X,<ymx2=q.yminusx); */
 6463      FieldOperations.fe_mul(out r.Z, ref r.X, ref q.yminusx);
 64
 65      /* qhasm: B = YmX1*ypx2 */
 66      /* asm 1: fe_mul(>B=fe#2,<YmX1=fe#2,<ypx2=fe#15); */
 67      /* asm 2: fe_mul(>B=r.Y,<YmX1=r.Y,<ypx2=q.yplusx); */
 6468      FieldOperations.fe_mul(out r.Y, ref r.Y, ref q.yplusx);
 69
 70      /* qhasm: C = xy2d2*T1 */
 71      /* asm 1: fe_mul(>C=fe#4,<xy2d2=fe#17,<T1=fe#14); */
 72      /* asm 2: fe_mul(>C=r.T,<xy2d2=q.xy2d,<T1=p.T); */
 6473      FieldOperations.fe_mul(out r.T, ref q.xy2d, ref p.T);
 74
 75      /* qhasm: D = 2*Z1 */
 76      /* asm 1: fe_add(>D=fe#5,<Z1=fe#13,<Z1=fe#13); */
 77      /* asm 2: fe_add(>D=t0,<Z1=p.Z,<Z1=p.Z); */
 6478      FieldOperations.fe_add(out t0, ref p.Z, ref p.Z);
 79
 80      /* qhasm: X3 = A-B */
 81      /* asm 1: fe_sub(>X3=fe#1,<A=fe#3,<B=fe#2); */
 82      /* asm 2: fe_sub(>X3=r.X,<A=r.Z,<B=r.Y); */
 6483      FieldOperations.fe_sub(out r.X, ref r.Z, ref r.Y);
 84
 85      /* qhasm: Y3 = A+B */
 86      /* asm 1: fe_add(>Y3=fe#2,<A=fe#3,<B=fe#2); */
 87      /* asm 2: fe_add(>Y3=r.Y,<A=r.Z,<B=r.Y); */
 6488      FieldOperations.fe_add(out r.Y, ref r.Z, ref r.Y);
 89
 90      /* qhasm: Z3 = D-C */
 91      /* asm 1: fe_sub(>Z3=fe#3,<D=fe#5,<C=fe#4); */
 92      /* asm 2: fe_sub(>Z3=r.Z,<D=t0,<C=r.T); */
 6493      FieldOperations.fe_sub(out r.Z, ref t0, ref r.T);
 94
 95      /* qhasm: T3 = D+C */
 96      /* asm 1: fe_add(>T3=fe#4,<D=fe#5,<C=fe#4); */
 97      /* asm 2: fe_add(>T3=r.T,<D=t0,<C=r.T); */
 6498      FieldOperations.fe_add(out r.T, ref t0, ref r.T);
 99
 100      /* qhasm: return */
 101
 64102    }
 103  }
 104}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p1p1_to_p2.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = p
 9    */
 10    internal static void ge_p1p1_to_p2(out GroupElementP2 r, ref GroupElementP1P1 p)
 77811    {
 77812      FieldOperations.fe_mul(out r.X, ref p.X, ref p.T);
 77813      FieldOperations.fe_mul(out r.Y, ref p.Y, ref p.Z);
 77814      FieldOperations.fe_mul(out r.Z, ref p.Z, ref p.T);
 77815    }
 16
 17  }
 18}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p1p1_to_p3.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = p
 9    */
 10    internal static void ge_p1p1_to_p3(out GroupElementP3 r, ref  GroupElementP1P1 p)
 79511    {
 79512      FieldOperations.fe_mul(out r.X, ref p.X, ref p.T);
 79513      FieldOperations.fe_mul(out r.Y, ref p.Y, ref p.Z);
 79514      FieldOperations.fe_mul(out r.Z, ref p.Z, ref p.T);
 79515      FieldOperations.fe_mul(out r.T, ref p.X, ref p.Y);
 79516    }
 17  }
 18}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p2_0.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    internal static void ge_p2_0(out  GroupElementP2 h)
 38    {
 39      FieldOperations.fe_0(out h.X);
 310      FieldOperations.fe_1(out h.Y);
 311      FieldOperations.fe_1(out h.Z);
 312    }
 13  }
 14}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p2_dbl.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = 2 * p
 9    */
 10
 11    internal static void ge_p2_dbl(out GroupElementP1P1 r, ref GroupElementP2 p)
 78912    {
 13      FieldElement t0;
 14
 15      /* qhasm: enter ge_p2_dbl */
 16
 17      /* qhasm: fe X1 */
 18
 19      /* qhasm: fe Y1 */
 20
 21      /* qhasm: fe Z1 */
 22
 23      /* qhasm: fe A */
 24
 25      /* qhasm: fe AA */
 26
 27      /* qhasm: fe XX */
 28
 29      /* qhasm: fe YY */
 30
 31      /* qhasm: fe B */
 32
 33      /* qhasm: fe X3 */
 34
 35      /* qhasm: fe Y3 */
 36
 37      /* qhasm: fe Z3 */
 38
 39      /* qhasm: fe T3 */
 40
 41      /* qhasm: XX=X1^2 */
 42      /* asm 1: fe_sq(>XX=fe#1,<X1=fe#11); */
 43      /* asm 2: fe_sq(>XX=r.X,<X1=p.X); */
 78944      FieldOperations.fe_sq(out r.X, ref p.X);
 45
 46      /* qhasm: YY=Y1^2 */
 47      /* asm 1: fe_sq(>YY=fe#3,<Y1=fe#12); */
 48      /* asm 2: fe_sq(>YY=r.Z,<Y1=p.Y); */
 78949      FieldOperations.fe_sq(out r.Z, ref p.Y);
 50
 51      /* qhasm: B=2*Z1^2 */
 52      /* asm 1: fe_sq2(>B=fe#4,<Z1=fe#13); */
 53      /* asm 2: fe_sq2(>B=r.T,<Z1=p.Z); */
 78954      FieldOperations.fe_sq2(out r.T, ref p.Z);
 55
 56      /* qhasm: A=X1+Y1 */
 57      /* asm 1: fe_add(>A=fe#2,<X1=fe#11,<Y1=fe#12); */
 58      /* asm 2: fe_add(>A=r.Y,<X1=p.X,<Y1=p.Y); */
 78959      FieldOperations.fe_add(out r.Y, ref p.X, ref p.Y);
 60
 61      /* qhasm: AA=A^2 */
 62      /* asm 1: fe_sq(>AA=fe#5,<A=fe#2); */
 63      /* asm 2: fe_sq(>AA=t0,<A=r.Y); */
 78964      FieldOperations.fe_sq(out t0, ref r.Y);
 65
 66      /* qhasm: Y3=YY+XX */
 67      /* asm 1: fe_add(>Y3=fe#2,<YY=fe#3,<XX=fe#1); */
 68      /* asm 2: fe_add(>Y3=r.Y,<YY=r.Z,<XX=r.X); */
 78969      FieldOperations.fe_add(out r.Y, ref r.Z, ref r.X);
 70
 71      /* qhasm: Z3=YY-XX */
 72      /* asm 1: fe_sub(>Z3=fe#3,<YY=fe#3,<XX=fe#1); */
 73      /* asm 2: fe_sub(>Z3=r.Z,<YY=r.Z,<XX=r.X); */
 78974      FieldOperations.fe_sub(out r.Z, ref r.Z, ref r.X);
 75
 76      /* qhasm: X3=AA-Y3 */
 77      /* asm 1: fe_sub(>X3=fe#1,<AA=fe#5,<Y3=fe#2); */
 78      /* asm 2: fe_sub(>X3=r.X,<AA=t0,<Y3=r.Y); */
 78979      FieldOperations.fe_sub(out r.X, ref t0, ref r.Y);
 80
 81      /* qhasm: T3=B-Z3 */
 82      /* asm 1: fe_sub(>T3=fe#4,<B=fe#4,<Z3=fe#3); */
 83      /* asm 2: fe_sub(>T3=r.T,<B=r.T,<Z3=r.Z); */
 78984      FieldOperations.fe_sub(out r.T, ref r.T, ref r.Z);
 85
 86      /* qhasm: return */
 87
 78988    }
 89  }
 90}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_0.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    internal static void ge_p3_0(out GroupElementP3 h)
 88    {
 89      FieldOperations.fe_0(out h.X);
 810      FieldOperations.fe_1(out h.Y);
 811      FieldOperations.fe_1(out h.Z);
 812      FieldOperations.fe_0(out  h.T);
 813    }
 14  }
 15}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_dbl.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = 2 * p
 9    */
 10    internal static void ge_p3_dbl(out GroupElementP1P1 r, ref GroupElementP3 p)
 1111    {
 12      GroupElementP2 q;
 1113      ge_p3_to_p2(out q, ref p);
 1114      ge_p2_dbl(out r, ref q);
 1115    }
 16  }
 17}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_to_cached.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = p
 9    */
 10    internal static void ge_p3_to_cached(out GroupElementCached r, ref GroupElementP3 p)
 2411    {
 2412      FieldOperations.fe_add(out r.YplusX, ref p.Y, ref p.X);
 2413      FieldOperations.fe_sub(out r.YminusX, ref p.Y, ref p.X);
 2414      r.Z = p.Z;
 2415      FieldOperations.fe_mul(out r.T2d, ref p.T, ref LookupTables.d2);
 2416    }
 17  }
 18}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_to_p2.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = p
 9    */
 10    internal static void ge_p3_to_p2(out GroupElementP2 r, ref GroupElementP3 p)
 1111    {
 1112      r.X = p.X;
 1113      r.Y = p.Y;
 1114      r.Z = p.Z;
 1115    }
 16  }
 17}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_tobytes.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    internal static void ge_p3_tobytes(byte[] s, int offset, ref GroupElementP3 h)
 88    {
 9      FieldElement recip;
 10      FieldElement x;
 11      FieldElement y;
 12
 813      FieldOperations.fe_invert(out recip, ref h.Z);
 814      FieldOperations.fe_mul(out x, ref h.X, ref  recip);
 815      FieldOperations.fe_mul(out y, ref  h.Y, ref  recip);
 816      FieldOperations.fe_tobytes(s, offset, ref y);
 817      s[offset + 31] ^= (byte)(FieldOperations.fe_isnegative(ref x) << 7);
 818    }
 19  }
 20}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_precomp_0.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    internal static void ge_precomp_0(out GroupElementPreComp h)
 5128    {
 5129      FieldOperations.fe_1(out h.yplusx);
 51210      FieldOperations.fe_1(out h.yminusx);
 51211      FieldOperations.fe_0(out h.xy2d);
 51212    }
 13  }
 14}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_scalarmult_base.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5    internal static partial class GroupOperations
 6    {
 7        static byte equal(byte b, byte c)
 40968        {
 9
 409610            byte ub = b;
 409611            byte uc = c;
 409612            byte x = (byte)(ub ^ uc); /* 0: yes; 1..255: no */
 409613            UInt32 y = x; /* 0: yes; 1..255: no */
 1228814            unchecked { y -= 1; } /* 4294967295: yes; 0..254: no */
 409615            y >>= 31; /* 1: yes; 0: no */
 409616            return (byte)y;
 409617        }
 18
 19        static byte negative(sbyte b)
 51220        {
 51221            ulong x = unchecked((ulong)(long)b); /* 18446744073709551361..18446744073709551615: yes; 0..255: no */
 51222            x >>= 63; /* 1: yes; 0: no */
 51223            return (byte)x;
 51224        }
 25
 26        static void cmov(ref GroupElementPreComp t, ref GroupElementPreComp u, byte b)
 460827        {
 460828            FieldOperations.fe_cmov(ref t.yplusx, ref u.yplusx, b);
 460829            FieldOperations.fe_cmov(ref t.yminusx, ref u.yminusx, b);
 460830            FieldOperations.fe_cmov(ref t.xy2d, ref u.xy2d, b);
 460831        }
 32
 33        static void select(out GroupElementPreComp t, int pos, sbyte b)
 51234        {
 35            GroupElementPreComp minust;
 51236            byte bnegative = negative(b);
 51237            byte babs = (byte)(b - (((-bnegative) & b) << 1));
 38
 51239            ge_precomp_0(out t);
 51240            var table = LookupTables.Base[pos];
 51241            cmov(ref t, ref table[0], equal(babs, 1));
 51242            cmov(ref t, ref table[1], equal(babs, 2));
 51243            cmov(ref t, ref table[2], equal(babs, 3));
 51244            cmov(ref t, ref table[3], equal(babs, 4));
 51245            cmov(ref t, ref table[4], equal(babs, 5));
 51246            cmov(ref t, ref table[5], equal(babs, 6));
 51247            cmov(ref t, ref table[6], equal(babs, 7));
 51248            cmov(ref t, ref table[7], equal(babs, 8));
 51249            minust.yplusx = t.yminusx;
 51250            minust.yminusx = t.yplusx;
 51251            FieldOperations.fe_neg(out minust.xy2d, ref t.xy2d);
 51252            cmov(ref t, ref minust, bnegative);
 51253        }
 54
 55        /*
 56        h = a * B
 57        where a = a[0]+256*a[1]+...+256^31 a[31]
 58        B is the Ed25519 base point (x,4/5) with x positive.
 59
 60        Preconditions:
 61          a[31] <= 127
 62        */
 63
 64        internal static void ge_scalarmult_base(out GroupElementP3 h, byte[] a, int offset)
 865        {
 66            // todo: Perhaps remove this allocation
 867            sbyte[] e = new sbyte[64];
 68            sbyte carry;
 69            GroupElementP1P1 r;
 70            GroupElementP2 s;
 71            GroupElementPreComp t;
 72            int i;
 73
 52874            for (i = 0; i < 32; ++i)
 25675            {
 25676                e[2 * i + 0] = (sbyte)((a[offset + i] >> 0) & 15);
 25677                e[2 * i + 1] = (sbyte)((a[offset + i] >> 4) & 15);
 25678            }
 79            /* each e[i] is between 0 and 15 */
 80            /* e[63] is between 0 and 7 */
 81
 882            carry = 0;
 102483            for (i = 0; i < 63; ++i)
 50484            {
 50485                e[i] += carry;
 50486                carry = (sbyte)(e[i] + 8);
 50487                carry >>= 4;
 50488                e[i] -= (sbyte)(carry << 4);
 50489            }
 890            e[63] += carry;
 91            /* each e[i] is between -8 and 8 */
 92
 893            ge_p3_0(out h);
 52894            for (i = 1; i < 64; i += 2)
 25695            {
 25696                select(out t, i / 2, e[i]);
 51297                ge_madd(out r, ref h, ref t); ge_p1p1_to_p3(out h, ref r);
 25698            }
 99
 16100            ge_p3_dbl(out r, ref h); ge_p1p1_to_p2(out s, ref r);
 16101            ge_p2_dbl(out r, ref s); ge_p1p1_to_p2(out s, ref r);
 16102            ge_p2_dbl(out r, ref s); ge_p1p1_to_p2(out s, ref r);
 16103            ge_p2_dbl(out r, ref s); ge_p1p1_to_p3(out h, ref r);
 104
 528105            for (i = 0; i < 64; i += 2)
 256106            {
 256107                select(out t, i / 2, e[i]);
 512108                ge_madd(out r, ref h, ref t); ge_p1p1_to_p3(out h, ref r);
 256109            }
 8110        }
 111
 112    }
 113}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_sub.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    /*
 8    r = p - q
 9    */
 10
 11    internal static void ge_sub(out GroupElementP1P1 r, ref  GroupElementP3 p, ref  GroupElementCached q)
 5912    {
 13      FieldElement t0;
 14
 15      /* qhasm: enter ge_sub */
 16
 17      /* qhasm: fe X1 */
 18
 19      /* qhasm: fe Y1 */
 20
 21      /* qhasm: fe Z1 */
 22
 23      /* qhasm: fe Z2 */
 24
 25      /* qhasm: fe T1 */
 26
 27      /* qhasm: fe ZZ */
 28
 29      /* qhasm: fe YpX2 */
 30
 31      /* qhasm: fe YmX2 */
 32
 33      /* qhasm: fe T2d2 */
 34
 35      /* qhasm: fe X3 */
 36
 37      /* qhasm: fe Y3 */
 38
 39      /* qhasm: fe Z3 */
 40
 41      /* qhasm: fe T3 */
 42
 43      /* qhasm: fe YpX1 */
 44
 45      /* qhasm: fe YmX1 */
 46
 47      /* qhasm: fe A */
 48
 49      /* qhasm: fe B */
 50
 51      /* qhasm: fe C */
 52
 53      /* qhasm: fe D */
 54
 55      /* qhasm: YpX1 = Y1+X1 */
 56      /* asm 1: fe_add(>YpX1=fe#1,<Y1=fe#12,<X1=fe#11); */
 57      /* asm 2: fe_add(>YpX1=r.X,<Y1=p.Y,<X1=p.X); */
 5958      FieldOperations.fe_add(out r.X, ref p.Y, ref p.X);
 59
 60      /* qhasm: YmX1 = Y1-X1 */
 61      /* asm 1: fe_sub(>YmX1=fe#2,<Y1=fe#12,<X1=fe#11); */
 62      /* asm 2: fe_sub(>YmX1=r.Y,<Y1=p.Y,<X1=p.X); */
 5963      FieldOperations.fe_sub(out r.Y, ref p.Y, ref p.X);
 64
 65      /* qhasm: A = YpX1*YmX2 */
 66      /* asm 1: fe_mul(>A=fe#3,<YpX1=fe#1,<YmX2=fe#16); */
 67      /* asm 2: fe_mul(>A=r.Z,<YpX1=r.X,<YmX2=q.YminusX); */
 5968      FieldOperations.fe_mul(out r.Z, ref r.X, ref q.YminusX);
 69
 70      /* qhasm: B = YmX1*YpX2 */
 71      /* asm 1: fe_mul(>B=fe#2,<YmX1=fe#2,<YpX2=fe#15); */
 72      /* asm 2: fe_mul(>B=r.Y,<YmX1=r.Y,<YpX2=q.YplusX); */
 5973      FieldOperations.fe_mul(out r.Y, ref r.Y, ref q.YplusX);
 74
 75      /* qhasm: C = T2d2*T1 */
 76      /* asm 1: fe_mul(>C=fe#4,<T2d2=fe#18,<T1=fe#14); */
 77      /* asm 2: fe_mul(>C=r.T,<T2d2=q.T2d,<T1=p.T); */
 5978      FieldOperations.fe_mul(out r.T, ref q.T2d, ref p.T);
 79
 80      /* qhasm: ZZ = Z1*Z2 */
 81      /* asm 1: fe_mul(>ZZ=fe#1,<Z1=fe#13,<Z2=fe#17); */
 82      /* asm 2: fe_mul(>ZZ=r.X,<Z1=p.Z,<Z2=q.Z); */
 5983      FieldOperations.fe_mul(out r.X, ref p.Z, ref q.Z);
 84
 85      /* qhasm: D = 2*ZZ */
 86      /* asm 1: fe_add(>D=fe#5,<ZZ=fe#1,<ZZ=fe#1); */
 87      /* asm 2: fe_add(>D=t0,<ZZ=r.X,<ZZ=r.X); */
 5988      FieldOperations.fe_add(out t0, ref r.X, ref r.X);
 89
 90      /* qhasm: X3 = A-B */
 91      /* asm 1: fe_sub(>X3=fe#1,<A=fe#3,<B=fe#2); */
 92      /* asm 2: fe_sub(>X3=r.X,<A=r.Z,<B=r.Y); */
 5993      FieldOperations.fe_sub(out r.X, ref r.Z, ref r.Y);
 94
 95      /* qhasm: Y3 = A+B */
 96      /* asm 1: fe_add(>Y3=fe#2,<A=fe#3,<B=fe#2); */
 97      /* asm 2: fe_add(>Y3=r.Y,<A=r.Z,<B=r.Y); */
 5998      FieldOperations.fe_add(out r.Y, ref r.Z, ref r.Y);
 99
 100      /* qhasm: Z3 = D-C */
 101      /* asm 1: fe_sub(>Z3=fe#3,<D=fe#5,<C=fe#4); */
 102      /* asm 2: fe_sub(>Z3=r.Z,<D=t0,<C=r.T); */
 59103      FieldOperations.fe_sub(out r.Z, ref t0, ref r.T);
 104
 105      /* qhasm: T3 = D+C */
 106      /* asm 1: fe_add(>T3=fe#4,<D=fe#5,<C=fe#4); */
 107      /* asm 2: fe_add(>T3=r.T,<D=t0,<C=r.T); */
 59108      FieldOperations.fe_add(out r.T, ref t0, ref r.T);
 109
 110      /* qhasm: return */
 59111    }
 112
 113  }
 114}

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\Chaos.NaCl\Internal\Ed25519Ref10\ge_tobytes.cs

#LineLine coverage
 1using System;
 2
 3namespace Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10
 4{
 5  internal static partial class GroupOperations
 6  {
 7    internal static void ge_tobytes(byte[] s, int offset, ref  GroupElementP2 h)
 38    {
 9      FieldElement recip;
 10      FieldElement x;
 11      FieldElement y;
 12
 313      FieldOperations.fe_invert(out recip, ref h.Z);
 314      FieldOperations.fe_mul(out x, ref h.X, ref recip);
 315      FieldOperations.fe_mul(out y, ref h.Y, ref recip);
 316      FieldOperations.fe_tobytes(s, offset, ref y);
 317      s[offset + 31] ^= (byte)(FieldOperations.fe_isnegative(ref x) << 7);
 318    }
 19  }
 20}

Methods/Properties

ge_add(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP1P1&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementCached&)
slide(System.SByte[],System.Byte[])
ge_double_scalarmult_vartime(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP2&,System.Byte[],Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&,System.Byte[])
ge_frombytes_negate_vartime(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&,System.Byte[],System.Int32)
ge_madd(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP1P1&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementPreComp&)
ge_msub(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP1P1&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementPreComp&)
ge_p1p1_to_p2(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP2&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP1P1&)
ge_p1p1_to_p3(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP1P1&)
ge_p2_0(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP2&)
ge_p2_dbl(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP1P1&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP2&)
ge_p3_0(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&)
ge_p3_dbl(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP1P1&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&)
ge_p3_to_cached(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementCached&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&)
ge_p3_to_p2(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP2&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&)
ge_p3_tobytes(System.Byte[],System.Int32,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&)
ge_precomp_0(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementPreComp&)
equal(System.Byte,System.Byte)
negative(System.SByte)
cmov(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementPreComp&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementPreComp&,System.Byte)
select(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementPreComp&,System.Int32,System.SByte)
ge_scalarmult_base(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&,System.Byte[],System.Int32)
ge_sub(Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP1P1&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP3&,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementCached&)
ge_tobytes(System.Byte[],System.Int32,Renci.SshNet.Security.Chaos.NaCl.Internal.Ed25519Ref10.GroupElementP2&)