jasmin-lang / jasmin

Language for high-assurance and high-speed cryptography
MIT License
268 stars 55 forks source link

Support for more System Calls #507

Open Rixxc opened 1 year ago

Rixxc commented 1 year ago

This is a feature request to support more system calls in Jasmin.

Currently Jasmin only supports the getrandom system call. For more complex application (e.g. crypto agents) it is necessary to perform systemcalls to interact with the operating system. Desired system calls for a crypto agents are:

Rixxc commented 1 year ago

An example program could look like this:


fn main()
{
    reg int fd, size;
    reg ptr u8[1337] buf;

    fd = #open('testfile', 'r');
    size = #read(fd, buf);
    #close(fd);
    fd = #open('testfile2', 'w');
    size = #write(fd, buf, size);
    #close(fd);
}
vbgl commented 1 year ago

This suggest a new feature request: literal string constants.