这是indexloc提供的服务,不要输入任何密码
Skip to content

Binary representation of constants is unsupported: 0b10101 #36

@ErezBinyamin

Description

@ErezBinyamin

Not an urgent issue, but something that seems like it may be an easy fix.

Source Code:

const gal8 min_poly  = 0b11101,     // Minimal polynomial x^8 + x^4 + x^3 + x^2 + 1
generator = 0b10;        // Generator of Galois field

movcc output:

galois.c:14:    `0b11101' is a preprocessing number but an invalid integer constant
galois.c:15:    `0b10' is a preprocessing number but an invalid integer constant

I'm just a cryptography student trying to obfuscate my algorithms for a ctf I'm working on. The problem is easily fixed when I make the change to decimal representation, but... it'd be nice to have more readable source code that is compatible with movcc.

working source:

const gal8 min_poly  = 39,     // Minimal polynomial x^8 + x^4 + x^3 + x^2 + 1
          generator = 2;        // Generator of Galois field

I have never contributed to a github project before, but I would be happy to take a look at the source, attempt an edit, and submit a pull request if you do that sort of thing..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions