Post
Topic
Board Türkçe (Turkish)
Merits 1 from 1 user
Re: GPU ile Eliptik Eğri Aritmetiği ve Programlama Hakkında
by
John_Ahmet
on 22/12/2020, 02:07:14 UTC
⭐ Merited by Bthd (1)
Bu konudaki matematiği benden daha iyi biliyor olabilirsin. Sen de bana bu konuda daha detaylı bilgi verebilir misin?

Örneğin senin aradığın temel kodu ifade eden şöyle bir kod yazalım. Ancak burada x ve y kaç bitlik integer sayılar olmalı ve ECdouble için ne kadar duyarlı bir kayan noktalı sayı gerekiyor?

Bu temel kod üzerinden bana adım adım ElipticCurve'nin işlevini anlatabilir misin? EC_double işlevi de Point mi döndürüyor?

Code:
class Point
{
    public:
        long long int x, y;

    public: Point(long long int _x, long long int _y)
    {
        x = _x;
        y = _y;
    }

    public: void print()
    {
        cout << "(";
        cout << x;
        cout << ", ";
        cout << y;
        cout ")";
    }
};

class EllipticCurve
{
    public:
        int a;
        int b;
        unsigned int m;

    public: EllipticCurve(int _a, int_b, unsigned int modul)
    {
        a = _a;
        b = _b;
        m = modul;
    }

    public: Point generate(unsigned long long int x)
    {
        // looks for Points on the curve with the given x coordinate
        // returns the first matching point
    }

    public: Point add(Point p, Point q)
    {
        // complex addition function with if-else trees
        // the function code is not needed for this question
    }

    public: Point mul(Point p, unsigned int n)
    {
        // see above
    }
};