Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Does anyone know what these pseudocode symbols mean?

  • 06-07-2008 01:15AM
    #1
    Closed Accounts Posts: 12,382 ✭✭✭✭


    Hello

    I hope someone can help me with this.

    I'm teaching myself Elliptic Curve Cryptography and the textbooks are trying their best to be as complicated as possible.

    I'm trying to figure out what the symbols in the following pseudocode might mean. Can any of you help?

    Input: a, f
    Output: the inverse of a

    1. u <- a, v <- f
    2. g1 <- 1, g2 <- 0
    3. while u != 1 do
    3.1 j <- deg(u) - deg(v)
    3.2 if j < 0 then: u <-> v, g1 <-> g2, j <- - j
    3.3 u <- u + (z^j)v
    3.4 g1 <- g1 + (z^j)g2
    4. Return g1

    Right. I'm thinking the following:

    <- means "becomes" as in u becomes a
    deg(u) I have no idea what that means. I know a is a polynomial, so maybe they are talking about the degree of u? I have no idea.
    <-> i don't know
    j <- - j i don't know
    ^ means to the power of

    Anyone seen anything like this before?

    I don't know why these dicks can't just explain things like a normal human

    Thanks.


Comments

  • Moderators, Politics Moderators, Paid Member Posts: 45,530 Mod ✭✭✭✭Seth Brundle


    I presume the deg() function returns the degrees.
    <-> looks to me to be is equal to
    j<- -j looks to be j = -j
    ^ would be to the power of alright

    Looks real & unnecessarily messy alright

    Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/ .



  • Closed Accounts Posts: 12,382 ✭✭✭✭AARRRGH


    Thanks for the reply. :)

    I e-mailed the author of the book and he came back to me with the following -
    "<-" is "assignment". It is sometimes used to distinguish a claim of equality "a=b" from assignment of b to a.

    "<->" is admittedly less common. In the book, it means "interchange contents". It could be written as the sequence: t <- a, a <- b, b <- t.

    "deg" is "degree". For polynomials in one variable x, it is the highest power of x that appears. deg(x+x^4+1)=4.

    "j <- -j" means to change the sign of j and then assign the result back to j.


  • Moderators, Politics Moderators, Paid Member Posts: 45,530 Mod ✭✭✭✭Seth Brundle


    So I was pretty much right :D

    Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/ .



Advertisement
Advertisement