Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Another simple question: polynomial multiplication modulo 2

  • 10-07-2008 10: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