Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 893731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:16:02+00:00 2026-05-15T14:16:02+00:00

There are key self-contained algorithms – particularly cryptography-related such as AES, RSA, SHA1 etc

  • 0

There are key self-contained algorithms – particularly cryptography-related such as AES, RSA, SHA1 etc – which you can find many implementations of for free on the internet.

Some are written to be nice and portable clean C.

Some are written to be fast – often with macros, and explicit unrolling.

As far as I can tell, none are trying to be especially super-small – so I’m resigned to writing my own – explicitly AES128 decryption and SHA1 for ARM THUMB2. (I’ve verified by compiling all I can find for my target machine with GCC with -Os and -mthumb and such)

What patterns and tricks can I use to do so?

Are there compilers/tools that can roll-up code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:16:03+00:00Added an answer on May 15, 2026 at 2:16 pm

    It depends on what kind of space you are trying to optimise: code or data. There are essentially three variants of AES128 commonly in use, each differing in the amount of precomputed lookup table space.

    • The fastest version uses 4k arranged as four 32-bit x 256 entry lookup tables (commonly called T-tables). If you can afford that amount of data space then the only instructions in this version are the EORs to combine the table results, these will roll up into a very small piece of code.
    • The intermediate version uses a 8-bit x 256 entry lookup table to encode the SBox. The residual instructions need to implement the shift rows and mix columns steps so the code size is larger.
    • The smallest (data-size) version doesn’t use any lookup tables at all, but needs to compute all of the individual AES-field operations including the inversion. This will use the most instructions, even if you fold both the field-multiply and inversion into subroutines.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there special key bindings for pasting in command mode or search mode in
I was wondering if there was a key combination or some setting to change
I was wondering if there was any key mapping in Vim to allow me
in visual studio, is there any hot key to autoformatand indent your html code.
There is a function 'w32-toggle-lock-key to, effectively, simulate a press of capslock , numlock
There is the same question listed under The key 'UserID' does not exist in
There are several places on the internet that talk about having multy key dictionary
Is there a way to set the PRIMARY KEY in a single CREATE TABLE
There is a table: create table table1 ( id integer primary key, user_id varchar(36),
Is there any standard way to route all Key events from the control A

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.