leightweight factor implementation targeted at embedded systems