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

Another simple question: polynomial multiplication modulo 2

  • 10-07-2008 09:40PM
    #1
    Closed Accounts Posts: 12,382 ✭✭✭✭


    Right,

    Thanks everyone for the help so far.

    I'm implementing "binary polynomial multiplication" at the moment as part of some cryptography code I'm writing. Nearly finished...

    Anyway, this is my simple question:

    Multiply the following polynomials:

    (x^7 + x^5 + x^3 + x) * (x^27 + x^15 + x^13 + x^12 + x^11 + 1)

    The answer:

    x^34 + x^32 + x^30 + x^28 + x^22 + 2x^20 + x^19 + 3x^18 + x^17 + 3x^16 + x^15 + 2x^14 + x^13 + x^12 + x^7 + x^5 + x^3 + x

    Now, let's say I want to reduce this modulo 2. Should it become -

    A: x^34 + x^32 + x^30 + x^28 + x^22 + x^19 + x^18 + x^17 + x^16 + x^15 + x^13 + x^12 + x^7 + x^5 + x^3 + x

    or

    B: x^34 + x^32 + x^30 + x^28 + x^22 + x^19 + x^17 + x^15 + x^13 + x^12 + x^7 + x^5 + x^3 + x

    I think perhaps it should become A, as 3 modulo 2 is 1.

    In fact, I'm pretty sure of this, but I just want to double check before I move on to polynomial division and polynomial multiplicative inverse...

    Thanks :)


Comments

  • Closed Accounts Posts: 6,081 ✭✭✭LeixlipRed


    Assuming your multiplication is right then Answer A looks good.


Advertisement