Make sure that the octopus is thoroughly cleaned and the ink has been removed. Put it in a pot with 2/5 cup (100 ml) vinegar and some water. Allow to boil for 1 hour and 20 minutes on a moderate stove. Then rinse under running water and cut it into pieces.
Heat the olive oil in a large dish on the stove and cook the coarsely chopped onion, garlic, add the octopus and mix them well. Add the heated wine and let it boil for 5-10 minutes. Add the tomato paste and stir for 10 minutes, adding the spices and some water.