When I was a kid I used to walk 1.5 miles to the outdoor rink, then home in the dark, the first part through the park with no lights, by myself. Back then people didn't do all kinds of horrible things like they do now. Nowadays even with a gun, I would not walk through there at night.
I do believe my skates might buy me some time if I whacked someone good and hard with them in the head (Jackson Elite Plus are very hard and heavy). But as others have pointed out, it would take too long to get them out of the bag to make any difference.
If I was planning to take a walk in the dark with my skates and questioned safety, I would keep the skates out, tie the strings together and keep them slung over my shoulder.
If someone attacked my on the ice, I would probably be knocked down at first contact. In that case, I'd kick up and then they would also be down and neither of us would be able to get up quick enough to not get kicked. So we would both either have to give up, or would have a toe pick kicking fest with each other and have some lovely ugly scars on out faces to show off in future skating events.