Cryptographic Primitives based on Compact Knapsack Problem