Press the beans through a fine mesh strainer to form a paste. If beans are too dry to press, add some of the reserved cooking liquid.
Transfer paste to a saucepan along with sugar and salt, mixing well to combine. Heat over medium-low and stir until sugar dissolves.
Continue cooking to reduce to a thick paste.